Comment by Frank Heikens on Low granularity column: add to composite index vs...
Could you share the results from explain(analyze, verbose, buffers, settings) for this SQL statement? Also, check other queries on this table and whether they perform using these indexes. You need the...
View ArticleComment by Frank Heikens on IndexOptimize on VLDBs with tight maintenance window
Why do you even do it? What problem should it solve? And does it make your queries faster?
View ArticleComment by Frank Heikens on No config, data files and cluster after...
Check askubuntu.com
View ArticleComment by Frank Heikens on How to use an alias of a computed column from...
and projects.status in ('started', 'closed', 'rejected', 'canceled') is a strange combination with and closed > '2025-02-01'. Only records with the status closed can match, none of the other since...
View ArticleComment by Frank Heikens on does postgresql support unsigned bigint data type
When 9223372036854775807 IDs are insufficient, you most likely need a UUID. How many records per second do you create?
View ArticleComment by Frank Heikens on Why all Postgresql workers are waiting for a...
shared_buffers = 64GB is too much for a 128GB machine. It should be 32GB max. Other settings are also unusual.
View ArticleComment by Frank Heikens on Why all Postgresql workers are waiting for a...
@Leon The database configuration is pretty bad; you should change that first. Such a small database with so much RAM will live in memory, just like a memory database. A Redis database with the wrong...
View ArticleComment by Frank Heikens on Best Database for Bulk Reads and Fast Key Lookups...
might outperform is always true. And if not today, then tomorrow or next month. Besides, most performance limitations are sitting behind the keyboard and drinking coffee or tea. A dbms does much more...
View ArticleComment by Frank Heikens on Best way to achieve HIPAA compliance in a...
You can't be HIPAA compliant just because you did something (right) in the database. The database is just part of it.
View ArticleComment by Frank Heikens on Do I need to CREATE LANGUAGE plpgsql in...
Currently, only versions 13+ are supported by the PostgreSQL project. When your code depends on plpgsql, you should at least check for plpgsql: SELECT EXISTS(SELECT FROM pg_extension WHERE extname =...
View ArticleComment by Frank Heikens on Pattern match with CTE
Why do you want to use a CTE for a WHERE condition? And why do you add the braces {} to the ids? If you want to return a JSON object, use the JSON functions to create JSON.
View ArticleAnswer by Frank Heikens for PostgreSQL query stuck on LWLock:BufferMapping...
maintenance_work_mem is very low for a 104 GB database server that has 15TB storage. I would change this one and give it at least a few GB of RAM.But also check the rest of your configuration and...
View ArticleComment by Frank Heikens on Poor performance bucketing historical data with...
Please share the results of your SQL statement from explain(analyze, verbose, buffers, settings). All in plain text as an update of your question.
View ArticleAnswer by Frank Heikens for Poor performance bucketing historical data with...
I think your current query is wrong. Please check this one:SELECT CAST(day AS date) AS day , COALESCE(SUM(bad),0) AS bad , COALESCE(SUM(awful),0) AS awful , COALESCE(SUM(catastrophic),0) AS...
View ArticleComment by Frank Heikens on Greenplum/Postgres - Why not backward index scan?
The statistics are off: It expects rows=13501628 when, in reality, it only gets rows=14037. When was the last ANALYZE executed?
View ArticleComment by Frank Heikens on Greenplum/Postgres - Why not backward index scan?
It's most likely a Greenplum issue since we have used comparable SQL statements on large tables (500GB per partition) since PostgreSQL version 9.1 and have never had any issues.
View ArticleComment by Frank Heikens on 1tb toast size after dropping a large text column...
-I tried pg_repack to vacuum it but it timed out after 45 mins. Why did it time out? There is no time limit in pg_repack, so it must be something else.
View ArticleAnswer by Frank Heikens for PostgreSQL: reuse of complex intermediate result...
You need an index on test1_id in table test2, that will change things.Seq Scan on test1 t1 (cost=0.00..301450.63 rows=8761 width=12) (actual time=0.108..229.859 rows=8761 loops=1) SubPlan 1 ->...
View ArticleComment by Frank Heikens on Postgres User on Linux Mint Isn't Supposed to...
FATAL: role "me" does not exist You're using the wrong user. Be specific in your commands for psql, something like this: psql -p 5432 -h localhost -U postgres -d your_database_name This command uses...
View ArticleComment by Frank Heikens on mysql/postgresql row lock in high concurrency...
The data model is unusual since you have a 1-on-1 relation between the parent and child table. You could/should store the data in just one table.
View Article