New answers tagged

0 votes

How do I improve the performance of this particular delete function? Is table Partitioning the answer?

PARTITION BY RANGE TO_DAYS(...)) (Note that only certain functions apply here.) Rows being INSERTed will automatically go into the right partition. Maintain 9 partitions -- 1 a week old (a full day, ...
  • 73.8k
3 votes

Unable to restore database with datetime2(0) in Partition Function

You're not getting dynamic partition elimination when the data types don't match and there is a risk of truncation, as I explained a decade ago now in my article Why Doesn’t Partition Elimination Work?...
  • 78.8k
-1 votes

Need a PL/SQL code to drop many partition in 1 single SQL statements

Something like this: create or replace procedure test_user.drop_partitions (p_table_name in varchar2, p_partition_key in number) is l_partition_list varchar2(32767); begin select listagg(...
  • 39.3k
0 votes

MySQL Select query for a calculated column that uses previous row value for current row

SELECT *, CASE month WHEN 1 THEN salary WHEN 2 THEN LAG(salary) OVER (PARTITION BY employee ORDER BY month) + 10 ELSE LAG(salary) OVER (PARTITION BY ...
  • 18.6k
0 votes

Will partitions speed up data ingestion for Postgresql?

Partitioning might help you here, by keeping the partition's UID index smaller. Maintaining the index on the random UID will involve jumping to some random leaf page of the index and dirtying it. ...
  • 35.7k
2 votes

How can I finish a "RANGE type" partition in PostgreSQL?

I cannot be certain that I understood what you want, but perhaps this can help you. To transform your table into a partitioned table, you have to copy the data (which means a longer down time). ...
  • 40.8k
1 vote

How defragment compressed partitioned table in oracle?

I found a solution -- uncompress partition ALTER TABLE DEV_DW.TEST_TABLE move PARTITION SYS_P21822227 NOCOMPRESS UPDATE INDEXES; --required for shrink space ALTER TABLE TEST_TABLE enable row ...
1 vote

Is it advantageous to split parts of large time-based tables and store in separate data files?

I'm wondering if there is any advantage to introducing multiple filegroups The only reason to do this is if you have different tiers of storage that you want map your partitions to. For example, you ...

Top 50 recent answers are included