Re: Query optimization

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Durgamahesh Manne <maheshpostgres9(at)gmail(dot)com>
Cc: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Query optimization
Date: 2025-03-14 03:55:52
Message-ID: CAKFQuwYtV9LSjciyhjgbX2Pyg-FNyTx7uYp0oYTUNvLHd57VJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday, March 13, 2025, Durgamahesh Manne <maheshpostgres9(at)gmail(dot)com>
wrote:

>
>
> ------------------------------------------------------------
>>>>> ------------------------------------------------------------
>>>>> ------------------------------------------------------------
>>>>> --------------------------------------
>>>>>
>>>> Result (cost=2.80..2.83 rows=1 width=1) (actual time=0.029..0.030
>>> rows=1 loops=1)
>>> InitPlan 1 (returns $0)
>>> -> Index Only Scan using idx_cachekeys on cachekeys
>>> (cost=0.55..2.80 rows=1 width=0) (actual time=0.028..0.028 rows=1 loops=1)
>>> Index Cond: ((cachetype = 'BoMatrix'::text) AND (trsid =
>>> 'daznbetuk'::text) AND (brandid = 'daznbet'::text) AND (sportid =
>>> 'BOX'::text) AND (competitionid = 'U-1998'::text) AND (eventid =
>>> 'U-523596'::text))
>>> Heap Fetches: 1
>>> Planning Time: 0.084 ms
>>> Execution Time: 0.043 ms
>>>
>>
>>
>> To return one row takes 43ms is not optimal
>>
>
You are off by a factor of 1000 in your claimed performance. It’s 0.043ms

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2025-03-14 03:57:00 Re: Query optimization
Previous Message Durgamahesh Manne 2025-03-14 03:48:35 Re: Query optimization