sql - Truncate partition based on condition -


i need truncate partition in greenplum based on condition. easiest possible way achieve that?

example:

alter table package_info truncate partition ('box'); 

i need truncate partition value - box in table package_info particular condition. few package_ids.

some thing like, truncate partition containing package_type data package_id - 100,200,300. not inclined towards delete because if use delete, won't able compress table.

thanks.

in gpdb 4.3.x can delete ao , compressed table. should upgrade 4.2.x eol in 2 months , no longer have support

truncate command in databases used drop whole table/partition without validation , data scan, why fast. in gpdb alters pg_class different relfilenode , deletes table file underlying filesystem. there no option partially truncate table data

if still on 4.2.x have more smart. 1 option recreate partition without data. second option have separate "visibility map" table contain list of deleted package_ids, each time query table have join table remove "deleted" records


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -