Answer by Frank Heikens for Best way to implement non-mergeable view in...
I would start using JOIN's as the new standard, since 30 years ago, ANSI SQL-92.And when you need data from t1 and t2, there is no need for joining t3: Use EXISTS to check for the condition.To improve...
View ArticleComment by Frank Heikens on Is there a way to assign PostgreSQL users' a...
No, not possible. You can tune work_mem, but giving someone less work_mem could result in forcing their queries to use more IO. And that could hurt your entire system pretty bad. So what is your real...
View ArticleComment by Frank Heikens on Why is my mean much more bigger than my Execution...
Could you share the exact command that you use to start hyperfine ?
View ArticleAnswer by Frank Heikens for Why is my mean much more bigger than my Execution...
I get the impression that Hyperfine measures the complete end-to-end call, including getting access to the container, starting psql and executing the query. If you want to measure just the query,...
View ArticleComment by Frank Heikens on autovacuum, vacuum, analyize reset table index...
No, (auto) vacuum and analyze don't reset the stats.
View ArticleComment by Frank Heikens on Wrong index usage in LEFT JOINs ( gist index...
What is your current setting for cpu_operator_cost and what happens when you increase this cost? And what about random_page_cost compared to seq_page_cost ?
View ArticleComment by Frank Heikens on PostgreSQL - Row Estimates Leading to Nested Loop...
Offtopic: soon to move to PG13 Why only to version 13 when you can safely migrate to version 16? That would give you a couple of years of additional support
View ArticleComment by Frank Heikens on Why listen_addresses not changing in PostgreSQL?
Looks like there is not even a network connection to the server, you would have gotten a different error message. Check your firewalls
View ArticleComment by Frank Heikens on slow postgres 10 query - have I done something...
How come WHERE name LIKE 's01b%' turns into Filter: ((name)::text ~~ 'YGS%'::text)? And what are the settings for random_page_costs?
View ArticleComment by Frank Heikens on Documentation Help for SQL Execution Plans
Use EXPLAIN(ANALYZE, VERBOSE, BUFFERS, SETTINGS) for your statements and the documentation : postgresql.org/docs/current/using-explain.html
View ArticleComment by Frank Heikens on How can a data warehouse like BigQuery...
Impossible to answer since you didn't share data, the data model, your query, your configuration, etc. Nobody knows what you tried. 350GB of data is not that much, and an M3 Max is a pretty fast...
View ArticleComment by Frank Heikens on Same query, same data, one server query planner...
The costs are based on the version, the configuration and the statistics. Besides that you need ANALYZE to keep the stats up to date.
View ArticleComment by Frank Heikens on Need advice for Postgres DB Optimization or...
could you please share the DDL for all tables and indexes involved and the result from EXPLAIN(analyze, verbose, buffers, settings) for the slow query? And of course the query itself. Currently your...
View ArticleComment by Frank Heikens on Microsoft asking me to remove Postgis to migrate...
Step 0: Make a backup!
View ArticleComment by Frank Heikens on What should I do so returning 200 rows is at...
Could you please use explain(analyze, verbose, buffers, settings) to get the whole picture? To me, it looks like the first query plan is not the best plan. And in this case, that is slower than the...
View ArticleComment by Frank Heikens on All possible ways to Scale a Database
Q4: I got PostgreSQL versions 12 to 17 running on my laptop, ports 54312 up to 54317.
View ArticleComment by Frank Heikens on Why does a query plan depend on the time interval...
@nbk Why do you think it’s slow? I don’t see any timing at all in the query plans, no analyze has been used. These are just plans, without any information about performance or speed
View ArticleComment by Frank Heikens on Query plan seems to depend on time interval...
@nbk Why do you think it’s slow? I don’t see any timing at all in the query plans, no analyze has been used. These are just plans, without any information about performance or speed
View ArticleComment by Frank Heikens on Long running query is idle in transaction
idle in transaction is an application problem, the database is just idle and waiting for your application to send the next request.
View Article