New answers tagged

1 vote

MySQL Query slows down on concurrent requests to different subpartitions of a partitioned table

SELECT DISTINCT is redundant with GROUP BY. Remove the DISTINCT. In my opinion, BY HASH is totally useless. Unless Aurora is doing something I don't know about, there is no parallelism when doing ...
user avatar
  • 68.7k
1 vote

Optimal procedure for partitioning with auto-increment PK as boundary value

Partitioning in SQL Server isn’t as straightforward as it is in other systems, so you should have a bit of a think if it’s really the right option. “I'm hoping partitioning will allow me to reduce ...
user avatar
  • 2,468
0 votes

Is reorganizing a partition effectively the same as copying data from one table to another?

[To the title question] Yes. Use sane partition naming. p0 sounds like the partition with the smallest dates. Instead call it future. p20220401 should contain row starting with, not ending before ...
user avatar
  • 68.7k
1 vote
Accepted

Dropping PostgreSQL partition is blocked as long as a client is reading data from any partition

ALTER TABLE ... DETACH PARTITION CONCURRENTLY is the best tool you have. Yes, it will wait until all transactions that read the table are done, but that shouldn't be a problem, because concurrent ...
user avatar
  • 33.2k

Top 50 recent answers are included