Skiplist index column order

Hi!

For a rowstore table, is there any difference in performance using a skiplist index with multiple columns, where the key is ordered by lowest → highest cardinality vs highest → lowest cardinality?

Assuming that query can be adjusted to accommodate either ordering, does it make a difference in performance what comes first?

1 Like

Hi Erica,

Not if your index lookups (or any other operator that uses the index) are using all columns in the index. Typically the reason to put one column before another in the index is so you can match on a prefix of the key columns (index on (c1,c2) supports lookup on c1 as well as on c1,c2). If your queries are such that prefixes aren’t important, then the order of the columns in the index also isn’t important.

-Adam

2 Likes

Perfect, thank you for the insight!

1 Like