Indexing on a logical is not allowed for performance reasons.

if you really need to build the index you can convert the logical to a string, but we don’t recommend it unless there’s really no other way around it.

LARGE table (over 4 millons records and over 1.5gb) with indexes.How do i replace te SET KEY TO xxx to get a similar performance? (and to get full index optimization)
You can use SET FILTER, or you may find Virtual Tables to be helpful

Lianja will optimize on indexes when it can so in your case you just need to have an index on “country” and it will use that and not scan the whole table.
You can experiment using the “explain” command to see how it will perform the query.
index on country tag country
explain select * from tablename where country=”USA”
Also worth noting is that Lianja will also use filtered indexes where possible.

In vfp you would define an index of type candidate. 
Just use the INDEX ON command and the UNIQUE keyword, e.g. in the Console:
open database southwind
use employees
index on trim(lastname)+” “+firstname unique tag fullname
Or in SQL, specify the UNIQUE keyword in the CREATE INDEX command, e.g. in the Console:
create unique index sqlfullname on employees (trim(lastname)+” “+firstname)

You can index on logical fields – they just need to be converted to character first – use LTOS().

How I can create a normal or production index for deleted records of lianja table?
Indexing on a logical is not allowed for performance reasons. 
index on etos(deleted()) to adu_del

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.