52 questions
-2 votes
2 answers
120 views
Unique constraint on partitioned table must include all partitioning columns [duplicate]
I'm trying to create this partitioned table in my PostgreSQL database: create table messages_table ( id bigserial not null, class_name varchar(255), date_created timestamp, service ...
0 votes
0 answers
76 views
Table partition and switching on existing table
I have a table with huge volume of data , and the same need to be get partitioned based on one integer column (purgeready) which only have two values 0 and 1. Since it is in production I want to ...
0 votes
0 answers
33 views
Deleting data from MySQL table periodically [duplicate]
We are using MySQL where we have almost around 100 tables. Data in these tables grow with time. So we need to delete the older data periodically. I think there are two approaches for this. First is to ...
0 votes
1 answer
559 views
How to create future partitions for already partitioned table
What is the most suitable way to create partitions for the already partitioned table TBLDATA with two indexes (TBLDATA~1 and TBLDATA~2) in the Oracle DB? My table consists of TBLDATA_MIN_PART, ...
2 votes
0 answers
272 views
Why does Spark shuffle the data while joining two partitioned & bucketed tables
I am trying to create a view on top of two tables. Table 1: Partitioned by col1 Bucketed by col2 (no of buckets: 3600) Table 2: Partitioned by col1 Bucketed by col2 ( no of buckets:3600) View: Table1 ...
1 vote
1 answer
265 views
MySQL RANGE table partitioning by months for 2 years records
I'm exploring on MySQL table partitioning and I have a table which have 2 years of records. I'm trying to create a new table which is similar to the current table I have so that I can copy the data ...
0 votes
1 answer
929 views
How to split this partition table using values less than and not get ORA-00906
I would like to ask you for help, I've been looking for an example for days and I haven't found anything that works. I have a partitioned table in Oracle 11g and these are its last two partitions. ...
1 vote
0 answers
800 views
How to choose between partitioned table vs partitioned view?
We are importing daily data (~600K rows) from Google GA4 into our data warehouse. We are trying to decide how we are going to store the data. We're considering either a partitioned table or a ...
3 votes
1 answer
10k views
PostgreSQL unique constraint on partitioned table must include all partitioning columns
I want to create a partitioned table in the PostgreSQL database and run the below query. CREATE TABLE tracking_trackingdata ( "id" uuid NOT NULL, ...
0 votes
1 answer
943 views
what happens to partitioned local indexes after a table partition is dropped oracle
I have a requirement to drop multiple partitions for a table every month. The table has been partitioned based on the year and month and has partitioned local indexes 1.since the indexes are local ,I ...
0 votes
1 answer
145 views
Main table update call trigger on partition
I have a table let's call it movie that is partitioned by genre. I have a trigger defined on one of the partitions as follows: create trigger refresh after insert or update or delete on movie_comedy ...
0 votes
0 answers
274 views
Calculating Percentile on large SQL tables
I have a large SQL table with 100+ million records in SQL Server as follows: +-----------+----------+----------+----------+----------+ |CustomerID |TransDate |Category | Num_Trans |Sum_Trans | +-------...
0 votes
1 answer
1k views
Postgresql Sqlalchemy dynamic table partition creation issue
I'm using postgresql and python sqllachmey for creating the partitioned table. Below is the example code. from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.types import Text Base ...
0 votes
2 answers
190 views
I want to divide a table into two half such that the number of rows and sum of amount column is similar
For example please find the below data: account balance 9999 110 9998 111 9997 112 9996 113 9995 114 9994 115 9993 116 9992 117 9991 118 9990 119 The output should be in such a way that there are 5 ...
0 votes
1 answer
1k views
SQL Server Partitioning on a table that could update data in older partitions
So, I have a table that typically has around 300-500K rows being inserted in to it within a 24 hour time period. Data is also continuously queried from this table. There is an Intime column that holds ...