Re: Query optimization - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Query optimization
Date
Msg-id b319261b-3e06-41f9-9772-1a1747ede2b1@aklaver.com
Whole thread Raw
In response to Query optimization  (Durgamahesh Manne <maheshpostgres9@gmail.com>)
Responses Re: Query optimization
List pgsql-general
On 3/13/25 12:12, Durgamahesh Manne wrote:
> Hi Team
> 
> This query takes more time than usual for execution

Define usual.


> How to optimize it in best possible way

Can't be answered without, to start:

1) Postgres version.

2) Complete(including indexes) table schema.

3) Output of EXPLAIN ANALYZE of query.

4) In what client is this being run?


> 
> Columns used in this query >> composite index eventhough not running 
> optimally
> 
> 
> 
> SELECT EXISTS (SELECT Key FROM CACHEKEYS WHERE CacheType = $1 AND TrsId 
> = $2 AND BrandId = $3 AND SportId = $4 AND CompetitionId = $5 AND 
> EventId = $6 AND MarketId = $7 LIMIT ?)
> 
> Regards
> Durga Mahesh

-- 
Adrian Klaver
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: hide data from admins
Next
From: Laurenz Albe
Date:
Subject: Re: Query optimization