| From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
|---|---|
| To: | Durgamahesh Manne <maheshpostgres9(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Query optimization |
| Date: | 2025-03-13 19:17:23 |
| Message-ID: | b319261b-3e06-41f9-9772-1a1747ede2b1@aklaver.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(dot)klaver(at)aklaver(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Laurenz Albe | 2025-03-13 19:34:01 | Re: Query optimization |
| Previous Message | Greg Sabino Mullane | 2025-03-13 19:17:00 | Re: hide data from admins |