Top "Postgresql-performance" questions

About PostgreSQL query optimisation.

PostgreSQL query runs faster with index scan, but engine chooses hash join

The query: SELECT "replays_game".* FROM "replays_game" INNER JOIN "replays_playeringame" ON "replays_game"."id" = "replays_playeringame"."game_id" …

postgresql indexing query-optimization postgresql-performance
Slow nested loop left join with index scan 130k times in loop

I am really struggling to optimize this query: SELECT wins / (wins + COUNT(loosers.match_id) + 0.) winrate, wins + COUNT(loosers.match_…

postgresql indexing database-performance postgresql-performance postgresql-9.6
Optimize BETWEEN date statement

I need help in optimize a PostgreSQL query which uses the BETWEEN clause with a timestamp field. I have 2 tables: …

sql postgresql indexing between postgresql-performance
Query performance with concatenation and LIKE

Can someone explain the performance difference between these 3 queries? concat() function: explain analyze select * from person where (concat(last_name, …

sql postgresql pattern-matching concatenation postgresql-performance
Execute multiple functions together without losing performance

I have this process that has to make a series of queries, using pl/pgsql: --process: SELECT function1(); SELECT function2(); …

postgresql plpgsql database-performance query-performance postgresql-performance
PostgreSQL window function: partition by comparison

I'm trying to find the way of doing a comparison with the current row in the PARTITION BY clause in …

sql postgresql window-functions postgresql-performance
SQL function very slow compared to query without function wrapper

I have this PostgreSQL 9.4 query that runs very fast (~12ms): SELECT auth_web_events.id, auth_web_events.time_stamp, …

postgresql function postgresql-performance sql-execution-plan