Quantcast
Channel: User Frank Heikens - Database Administrators Stack Exchange
Browsing all 161 articles
Browse latest View live

Comment by Frank Heikens on Postgres - How can I use two column headers, use...

Please share your SQL statements and tell us what the problem is. What some GUI is doing, I have no idea. For sorting you should use ORDER BY in your SQL statement. See also...

View Article


Comment by Frank Heikens on Difference between UPSERT and MERGE?

It's a misleading answer; it's better to remove it. Or proof it.

View Article


Comment by Frank Heikens on How to turn off this inane pgAdmin 4 "feature"...

I had selected the DELETE FROM table That's an easy one, don't do it. This is a pilot error, and you can make errors like this with any tool. However, in DataGrip you do get a warning if you do so....

View Article

Comment by Frank Heikens on plpgsql Function not using the index

Why do you even use plpgsql for this function? There is no benefit, but it is slower by default.

View Article

Comment by Frank Heikens on Is there a limit to how many temporary tables...

The underlying assumption is, I would not be so sure about that. Before moving in this direction, I would test this and check the query plans. I have never seen something like this to be a successful...

View Article


Comment by Frank Heikens on Is this a good entity-relationsip model for my...

Numbered columns indicate a poor normalization approach. It violates the first normal form and will make querying harder and performance most likely worse. You will need to change the model one day...

View Article

Comment by Frank Heikens on Parallel worker failed to initialize error

See also postgresql.org/docs/current/… And a +1 for mentioning work_mem since that will be the next problem.

View Article

Comment by Frank Heikens on same query in 2 schema which same indexes and...

Did you run an ANALYZE ?

View Article


Comment by Frank Heikens on No implicit type conversion with WHEN

You might want to use LPAD to add leading zeros

View Article


Comment by Frank Heikens on Parallel worker failed to initialize error

25000 connections * 512MB = 12500GB of memory. This is rather optimistic since each step in a query can use up to 512MB. And when a single query can use multiple workers, this is the amount for each...

View Article

Comment by Frank Heikens on Advice needed for VIEWS with some core columns...

Why do you have the same type of data in two different tables? Using one table would make the views obsolete.

View Article

Comment by Frank Heikens on How to turn off this pgAdmin 4 feature which...

"I had selected the DELETE FROM table" - That's an easy one, don't do it. This is a pilot error, and you can make errors like this with any tool. However, in DataGrip you do get a warning if you do so....

View Article

Comment by Frank Heikens on Best Approach for Detecting Changes in Master...

This can't be solved by using INSERT ... ON CONFLICT DO UPDATE ... ?

View Article


Comment by Frank Heikens on Lots and lots of missing rows if using GROUP BY...

Please add some test cases. Most likely your expectations are wrong since the query is wrong. Changing the SQL_MODE will help to avoid this type of mistake

View Article

Comment by Frank Heikens on RDS postgres slow read IO

What did AWS tell you about this? It's their platform, they know

View Article


Comment by Frank Heikens on PostgreSQL function , query disappear after long...

Sounds like a network problem. I've seen this behavior before when HAProxy killed connections after 3600 seconds.

View Article

Comment by Frank Heikens on Why does select query change order of rows in...

How the data is stored on disk and how the data is returned from a query without ORDER BY, are two very different things.

View Article


Answer by Frank Heikens for How to set data_directory as /data and pg_wal...

Set both --pgdata= and --waldir= when initdb creates a new PostgreSQL database cluster.

View Article

Comment by Frank Heikens on RDS postgres slow read IO

The maximum block size is 32kB, but to my knowledge, it is not available at AWS.

View Article

Comment by Frank Heikens on Postgres GUI that allows row merging, cascading...

So you want to delete records from this table, but before this, you first want to update unknown records in other tables based on the foreign keys. It’s doable but I’m not aware of any tools that can...

View Article
Browsing all 161 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>