database-partitioning

Partition by week/year/month to get over the partition limit?

久未见 提交于 2019-11-27 14:33:40
I have 32 years of data that I want to put into a partitioned table. However BigQuery says that I'm going over the limit (4000 partitions). For a query like: CREATE TABLE `deleting.day_partition` PARTITION BY FlightDate AS SELECT * FROM `flights.original` I'm getting an error like: Too many partitions produced by query, allowed 2000, query produces at least 11384 partitions How can I get over this limit? Instead of partitioning by day, you could partition by week/month/year. In my case each year of data contains around ~3GB of data, so I'll get the most benefits from clustering if I partition

Cassandra: choosing a Partition Key

穿精又带淫゛_ 提交于 2019-11-27 05:22:34
问题 I'm undecided whether it's better, performance-wise, to use a very commonly shared column value (like Country ) as partition key for a compound primary key or a rather unique column value (like Last_Name ). Looking at Cassandra 1.2's documentation about indexes I get this: " When to use an index : Cassandra's built-in indexes are best on a table having many rows that contain the indexed value. The more unique values that exist in a particular column, the more overhead you will have, on

Optimize Postgres timestamp query range

穿精又带淫゛_ 提交于 2019-11-26 12:29:49
问题 I have the following table and indices defined: CREATE TABLE ticket ( wid bigint NOT NULL DEFAULT nextval(\'tickets_id_seq\'::regclass), eid bigint, created timestamp with time zone NOT NULL DEFAULT now(), status integer NOT NULL DEFAULT 0, argsxml text, moduleid character varying(255), source_id bigint, file_type_id bigint, file_name character varying(255), status_reason character varying(255), ... ) I created an index on the created timestamp as follows: CREATE INDEX ticket_1_idx ON ticket

Partition by week/month//quarter/year to get over the partition limit?

陌路散爱 提交于 2019-11-26 08:26:43
问题 I have 32 years of data that I want to put into a partitioned table. However BigQuery says that I\'m going over the limit (4000 partitions). For a query like: CREATE TABLE `deleting.day_partition` PARTITION BY FlightDate AS SELECT * FROM `flights.original` I\'m getting an error like: Too many partitions produced by query, allowed 2000, query produces at least 11384 partitions How can I get over this limit? 回答1: Instead of partitioning by day, you could partition by week/month/year. In my case