Can I create an index on a table in Vertica?
Asked Answered
C

2

8

I've created a table on Vertica, and I want to create an index on that table. I can't see how to create an index on Vertica, though. Is it possible? If so, how can I do that?

Caracole answered 27/7, 2013 at 21:40 Comment(0)
V
12

Vertica's speed is hinged on using columnar projections, not indexes. Please see: https://my.vertica.com/docs/6.1.x/HTML/index.htm#12037.htm

So, in fact, Vertica doesn't have the ability to create an index. You will have to use a projection to achieve good performance.

Vacillation answered 28/7, 2013 at 17:23 Comment(0)
W
5

kimbo's answer is correct.

I try to explain it to people a few ways. But basically, the table itself is a construct like a view. Unlike traditional databases, the table itself isn't saved to disk and then indexed in different ways. Projections handle the sorting, indexing, layout on disk, etc.

I also use an analogy of a deck of cards. A table can be considered a deck of cards. You ask for particular hands. Projections are like particular shuffles. Some may be sorted by suit. Some by face value. And depending by what you ask for depends on what projection (in this analogy shuffle) you query.

Wellnigh answered 29/7, 2013 at 12:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.