partition key count mismatch

Moderator: NorbertKrupa

Post Reply
User avatar
Posts: 302
Joined: Fri Apr 13, 2012 6:28 am

partition key count mismatch

Post by nnani » Fri Mar 28, 2014 7:27 am

Hello all,

This is with respect to partitions.

I have a table which is partitioned by period_key column ( period_key is a int column)
The partition expression is like this

Code: Select all

((xxxx.PERIOD_KEY / 7))::int
I tried checking how many partition it has made with this statement

Code: Select all

select count(distinct(period_key / 7)) from xxxx.

This gives me 749

But if I check the number of partition_keys for this table in partitions table

Code: Select all

select count(distinct(partition_key)) from partitions where projection_name='xxxx' and table_schema='xxxx'
This gives me 129.

Am I making any mistake in calculating the period_keys.....They should be same right ?

Long way to go

You can check out my blogs at vertica-howto

Post Reply

Return to “Vertica SQL”