Results 1 to 2 of 2

Thread: [Answers] Indexing

Threaded View

  1. #1
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135

    [Answers] Indexing

    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.



    Q:
    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)
    A:
    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.
    So...
    index on country tag country
    Then...
    explain select * from tablename where country="USA"
    Also worth noting is that Lianja will also use filtered indexes where possible.



    Q:
    In vfp you would define an index of type candidate.
    A:
    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().



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



    All topics in [Answers] alphabetically: http://www.lianja.com/community/show...ll=1#post12352
    Last edited by josipradnik; 2016-11-15 at 03:43.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us