I am trying to understand how Vertica DB works and want to know what is the best way to create the projections that will be used by my queries.
- I know I can create by writing the code on the
vsql
line. - Provide the query that will be used to the Vertica Database Designer so that Vertica will create the proper projections for itself.
I am a bit confused, as I create them by hand (without the DB Designer), but Vertica does not seam to use them.
Here's an example:
I have the table AAA (
id, name, address
) and I am planning to run this query on it:select count(name) from AAA;
For this I am creating a projection called
proj1
:create projection proj1 as select name from AAA;
Now I have my created projection, but when i run the
explain
form, my select count script shows that the created projection is not used.
Can anyone help me understand the problem here?