From: | Dave Stibrany <dstibrany(at)gmail(dot)com> |
---|---|
To: | Sumeet Shukla <sumeet(dot)k(dot)shukla(at)gmail(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Dataset is fetched from cache but still takes same time to fetch records as first run |
Date: | 2017-06-23 00:54:41 |
Message-ID: | CAK17Jmm6WBXy-4-_H21PAopoU5o=FyoLwjBkPeJCNHCU59z-Qw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
The numbers you posted look exactly as I would expect. The first read hits
disk and takes 108ms, the second read hits the cache and takes 27ms.
On Thu, Jun 22, 2017 at 8:40 PM, Sumeet Shukla <sumeet(dot)k(dot)shukla(at)gmail(dot)com>
wrote:
> Both the first run and subsequent run takes same amount of time.
>
> *First Run:*
>
> "Seq Scan on d_payer (cost=0.00..8610.40 rows=121788 width=133) (actual
> time=8.760..98.582 rows=121788 loops=1)"
> " *Buffers: shared read=2521*"
> "Planning time: 16.820 ms"
> "Execution time: 108.626 ms"
>
>
> *Second Run:*
>
> "Seq Scan on d_payer (cost=0.00..8610.40 rows=121788 width=133) (actual
> time=0.010..18.456 rows=121788 loops=1)"
> " *Buffers: shared hit=2521*"
> "Planning time: 0.083 ms"
> "Execution time: 27.288 ms"
>
>
> Can anyone please help me understand and fix this.
>
>
> Thanks & Regards,
> Sumeet Shukla
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Sumeet Shukla | 2017-06-23 04:35:29 | Re: Dataset is fetched from cache but still takes same time to fetch records as first run |
Previous Message | Sumeet Shukla | 2017-06-23 00:40:35 | Dataset is fetched from cache but still takes same time to fetch records as first run |