All Questions
Tagged with database-design database-partitioning
35 questions
2
votes
1
answer
311
views
Using PostgreSQL table as tumbling window persistence layer
Currently, I'm storing a large amount of time-series data into the following PostgreSQL table:
create table view (
user_id uuid,
product_id integer,
banner_id integer,
campaign_id integer,
...
4
votes
1
answer
801
views
Is it guaranteed that bigserial column is unique across all partitions of a partitioned table?
I created the partitioned table in Postgres 15 with composite primary key:
CREATE TABLE T (
id bigserial NOT NULL,
date date,
...,
PRIMARY KEY(id, date)
) PARTITION BY RANGE (...
1
vote
1
answer
589
views
Why don't I see partition pruning for my query based on generate_series()?
I'm using declarative partitioning in PostgreSQL 12:
create table foo (
id integer not null,
date timestamp not null,
count integer default 0,
primary key (id, date)
)
partition ...
0
votes
1
answer
369
views
Cannot refer to table in public schema by different schema
I have the following example :
CREATE TABLE dt_totals (
dt_total date NOT NULL,
geo varchar(2) not null,
impressions integer DEFAULT 0 NOT NULL,
sales integer DEFAULT 0 NOT NULL
)
...
1
vote
0
answers
222
views
How to partition orders in Cosmos DB?
I'm working on an application where customers can order products and the manufacturer has to process these orders. I want to use Cosmos DB and I'm currently trying to decide how to model the data. I ...
0
votes
0
answers
276
views
Oracle Database Capacity Planning
Just want to know if there is a formula I can use how to estimate database storage size needed based on estimated number of records and data types of those records that will be stored.
Are there ...
0
votes
1
answer
3k
views
How to create multiple column partitions for postgresql db, one for time range and one for specific sensor ID?
I have one application to store and query the time series data from multiple sensors. The sensor readings of multiple months needed to be stored. And we also need add more and more sensors in the ...
0
votes
2
answers
140
views
MySQL partition by foreign key
I have a chat database in MySQL.
'users' table
user_id(PK), user_name
'chat' table
chat_id(PK), user1_id(FK), user2_id(FK)
'messages' table
message_id(PK), chat_id(FK), user_from(FK), ...
1
vote
1
answer
108
views
mysql database partition on extreme imbalance data?
2 million customers produce 2 billion orders in 2 years, but according to history data, 50% orders are belong to 100 top customers, so the data is extreme imbalance on customer id. the customers wish ...
0
votes
1
answer
311
views
how to design database for country wide data?
I have to design a data structure according to states in a country.
The country has more than 30 states and each state would be writing and reading data from its own state. The problem is that whether ...
0
votes
1
answer
3k
views
Partition By List and Range at the same time - Multiple Partitions MySQL
Is that possible in MySQL to use List and Range partitions together.
Let say
I have different categories and i want to put each category in "List Partition"
Now each category I want to create "Range ...
0
votes
0
answers
740
views
SQL server table partitioning on current date
I have big table . This table has eventDate column . I need to partition this table on two parts . The first part will contain the records where (currentDate - 10 days > eventDate) and the second part ...
4
votes
1
answer
2k
views
Multiple 'databases' within one graph database
I use GrapheneDB for hosting my neo4j database (db).
The problem
I have N clients and am looking for ways to automatically separate their content (their unique db) such that:
it does not overlap the ...
0
votes
1
answer
90
views
Best way to design for one-to-many code values in Oracle
We receive several millions of records per day on temperature metrics. Most of the pertinent metadata for these records is maintained in a single partitioned table by date (month). We are going to ...
3
votes
2
answers
79
views
At what scale of data is the ROI of partitioning the most valuable?
So I'm looking into data warehousing and partitioning and am very curious at to what scale makes the most sense for partitioning a data on a key (for instance, SaleDate).
Tutorials often mention that ...