Quantcast
Channel: User Frank Heikens - Database Administrators Stack Exchange
Browsing index pages (187 articles)
↧

Comment by Frank Heikens on Postgres tool to help with vacuum full when low...

How come that you get into this situation? It might have happened to us once or twice the last 20 years, but I wouln't call that "often". Besides that, your tables are just a few GB in size. Why do you...

View Article


Comment by Frank Heikens on ORDER BY slows down query to never finish

Why do you have three indexes on userid?

View Article


Comment by Frank Heikens on Increased query latency in Postgres after reindex

The 0 is the result of just one of the loops, not the sum of all loops. Did you try an index that covers all items that you need from table_1 ? And this you try to rewrite all JOINs to a single EXISTS...

View Article

Comment by Frank Heikens on PGVIP - simple auto failover to standby...

You assume that the primary database goes down first. But what if the secondary goes down first and then the primary? And how are you going to deal with a split-brain situation? Or how should a new...

View Article

Comment by Frank Heikens on Database Architecture

A provider can also be a client and a customer. Are you going to ask them to type in the information you already have? Or are you going to copy the data? And when an update is made, you're going to...

View Article


Comment by Frank Heikens on ow to Merge PostgreSQL Databases from Two Servers...

Replace all ID columns with a UUID. I wouldn't even try to keep the numeric IDs; in my opinion, it's next to impossible with 18 databases to merge. This means you must update every record in all 18...

View Article

Comment by Frank Heikens on Subquery Re-evaluation

I don't see any query plan that supports your assumption.

View Article

Comment by Frank Heikens on PostgresSQL - Slow restore performance on...

so -j=40 results in a 5 to 6 hours restore time, while -j 5 results in 3 hours 42 minutes. That tells you that 40 is too much; it's not the best performing setting. Try 10 or 20, and monitor the...

View Article


Comment by Frank Heikens on partitioning by varchar column

and the table has millions of rows You are aware that this is not a lot of data? Your performance issues are most likely caused by something else. Care to share a query plan? If so, use...

View Article


Comment by Frank Heikens on Why is GROUP BY on partitioned table slower than...

What version do you use? And could you please use explain(analyze, verbose, buffers, settings) to get all the details? Please update your question. (for now I think it's a configuration issue, using...

View Article

Comment by Frank Heikens on PostgreSQL shared memory vs OS cache on Windows

You're using an unsupported version of PostgreSQL and referencing even older versions. The only problem you have is that your maintenance is a few years behind. We can't solve that for you.

View Article

Comment by Frank Heikens on Partitioning on a categorical (low-cardinality)...

How many teams do you have? A smallint supports up to 32767 teams, integer up to 2147483647 teams, and bigint up to 9223372036854775807. Now you can choose between 2, 4, and 8 bytes per record. This...

View Article

Comment by Frank Heikens on Is it bad to have prefixes? - Like `CREATE TABLE...

Why would you call a table table_something? Or is your real name also Human_Samuel ? In databases, you can easily replace a table with a view, resulting in a view named table_something. Or you have to...

View Article


Answer by Frank Heikens for Correct way to index a boolean column when used...

I'd like to "move" archived (aka soft deleted) records to a different table partition:CREATE TABLE t1 (id int GENERATED ALWAYS AS IDENTITY , f1 text, f2 text, del_stamp timestamptz) PARTITION BY LIST (...

View Article

Comment by Frank Heikens on VACUUM stuck on vacuuming indexes for days on a...

Not a direct solution for the VACUUM issue, but what about table partitioning? Smaller tables are easier to handle, and depending on your usage patterns, there might even be partitions that won't be...

View Article


Comment by Frank Heikens on Null value does not violate FOREIGN KEY constraint?

For this data model, you would need MATCH PARTIAL. However, MATCH PARTIAL is not yet implemented. (Of course, NOT NULL constraints can be applied to the referencing column(s) to prevent these cases...

View Article

Comment by Frank Heikens on Composed nullable primary key

For this data model, you would need MATCH PARTIAL. However, MATCH PARTIAL is not yet implemented. (Of course, NOT NULL constraints can be applied to the referencing column(s) to prevent these cases...

View Article


Comment by Frank Heikens on How to speed up bulk insert with deduplication...

IMHO your select statement should not even select rows that are duplicates. An ON CONFLICT does an insert, but fails. So it's still writing data to the table, but that data will be ignored by the...

View Article

Comment by Frank Heikens on Does the MERGE PARTITION functionality actually...

Always check the manual when you run into a syntax error, especially when some syntax seems to be new. In this case it was not released and you can't find "merge" into the "alter table" section:...

View Article

Comment by Frank Heikens on Improve Performance when Sorting on an Aggregate

Please share at least the results from explain(analyze, verbose, buffers, settings) and the DDL for the indexes. tierB should have a combined index on tierA_id and updated. And when tierB is a copy of...

View Article
Browsing index pages (187 articles)


Latest Images