This is the Non clustered index we have : Now when I am running this query : In the execution plan I am getting the perfect Index Seek. But when ...
This is the Non clustered index we have : Now when I am running this query : In the execution plan I am getting the perfect Index Seek. But when ...
From postgres docs on GIN - Internally, a GIN index contains a B-tree index constructed over keys. But in my use case, I see Bitmap indexes ins ...
. Answers to this question are eligible for a +50 reputation bounty. Br ...
I want to replace some OUTER APPLYs in my SQL because they seem to be a little bit slow and eating resources () on a poor VPS. I have no idea what to ...
While executing below two queries, I notice serious difference in query plan. Why is that? Query plan So the main difference you can see is ...
In a location based app,there's a specific query which has to run fast: However, when after copying the database by using Postgres' tools: the q ...
I'm using PostgreSQL 13.7. When trying to optimize a query that is made of several sub-queries, I noticed that reducing the number of OR clauses in t ...
The schema: The query: This results in a very slow sequential scan. I tried rewriting as a series of ORs, but that just gave me a parallel seque ...
I have a SQL query that looks for a specific value in a table and then does inner joins across three tables to fetch the result set. The three tables ...
I have a complex postgres query that I've optimised with pg_hint_plan. Planning time is about 150ms while query time is about 30ms. The plan should ne ...
I've run into an issue where PostgreSQL (13.1 on windows, default config) would start preferring a generic plan after 5 executions because the plan es ...
If I understand correctly, under MVCC(multi version concurrency control), dead tuples are left in the page, until the Vacuum comes in and mark them "u ...
I have trouble understanding the following query plan (anonyized). There seems to be a gap in how much time the actual parts of the query took and a p ...
Problem I have the query,SELECT p.* FROM parties p INNER JOIN bib b ON p.id=b.id;. On Postgres version 9.2.24, this query takes 12 or 13 minutes. He ...
For some reason, the same query executed locally and from my golang backend application uses different execution plans. Flow of events: I have encoun ...
I am using PostgreSQL 13.4. I would like to execute the following query in order to receive the date of the most recent effect for each campaign in a ...
I've got a really strange issue with a Query plan generated for a very simple SQL query. The query is searching a full text index, and returning the c ...
When I run query and filter by agreement_id it is slow, but when I filter by an alias id it is fast. (Look at the end of the query) Why using same fi ...
Compare: At first case I call same find_period with same arguments. Because the function is IMMUTABLE I suppose that plan for it will be reused (sa ...
I have two pretty similar queries: WITH USAGE AS NOT MATERIALIZED ( SELECT ocd.*, 1 AS conf_suma FROM( SELECT o, o.agreement_id AS agreem ...