Page 1 of 1

partition key count mismatch

Posted: Fri Mar 28, 2014 7:27 am
by nnani
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 ?

Thanks