From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Carlos Henrique Reimer <carlos(dot)reimer(at)opendb(dot)com(dot)br> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Grittner <kgrittn(at)ymail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Runtime variations during day |
Date: | 2013-02-13 22:32:55 |
Message-ID: | 20130213223255.GI4546@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Carlos Henrique Reimer wrote:
> Another example that could help is this seqscan:
>
> explain analyze select sittrib8 from iparq.arript where sittrib8=33;
>
> In the evening:
> Fri Feb 8 14:00:01 BRST 2013
>
> QUERY
> PLAN
> --------------------------------------------------------------------------------------------------------------------------
> Seq Scan on arript (cost=100000000.00..100469613.21 rows=1 width=2)
> (actual time=198047.253..198047.253 rows=0 loops=1)
> Filter: (sittrib8 = 33)
> Total runtime: 198047.303 ms
> (3 rows)
>
>
> In the morning:
> Fri Feb 8 10:51:01 BRST 2013
> QUERY
> PLAN
> ------------------------------------------------------------------------------------------------------------------------
> Seq Scan on arript (cost=100000000.00..100469607.58 rows=1 width=2)
> (actual time=11982.597..11982.597 rows=0 loops=1)
> Filter: (sittrib8 = 33)
> Total runtime: 11982.654 ms
> (3 rows)
When I have seen things such as this, it's because the disks are busier
during the slow hours. Since there's not much activity in the morning,
the disks are idle and can scan the pages much more quickly.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2013-02-13 22:34:37 | Re: Runtime variations during day |
Previous Message | Carlos Henrique Reimer | 2013-02-13 22:23:31 | Re: Runtime variations during day |