Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

ERROR: Too many data partitions

I have the following table:

CREATE TABLE rosing_epg_program_events
(
id IDENTITY ,
uid varchar(512) NOT NULL,
name varchar(1024) NOT NULL,
program_uid varchar(512) NOT NULL,
….
)
PARTITION BY (rosing_epg_program_events.program_uid);

ALTER TABLE rosing_epg_program_events ADD CONSTRAINT C_PRIMARY PRIMARY KEY (id);


As you can see it partitioned by program_uid field. This field has a lot of values:

SELECT count(DISTINCT program_uid)
FROM rosing_epg_program_events

Result: 7089



Seems like I choose invalid field for partitioning (see Best Practices section here).

select table_schema, projection_name, count(1)
from v_monitor.partitions
where projection_name = 'rosing_epg_program_events_super'
group by table_schema, projection_name
order by table_schema, projection_name;

Result:

table_schema | projection_name | count
---------------------------------------------------------------
spbtv_russia_staging | rosing_epg_program_events_super | 1017


So, I want to remove partitioning from this table:

ALTER TABLE rosing_epg_program_events REMOVE PARTITIONING



but this SQL cause the following error:

Severity: ROLLBACK, Message: Too many data partitions, 
Sqlstate: 54000,
Hint: Verify that the table partitioning expression is correct,
Routine: handlePartitionKey,
File: /scratch_a/release/16125/vbuild/vertica/EE/Operators/DataTarget.cpp,
Line: 1478,
SQL: "ALTER TABLE rosing_epg_program_events REMOVE PARTITIONING"


So, how to fix this problem and remove partitioning from this table?

Comments

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.