From: | Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP patch: distinguish selectivity of < from <= and > from >= |
Date: | 2017-07-04 09:37:36 |
Message-ID: | CAFjFpReiJNoOqOLksX3CQkeig8RVU+O7mz9OgPuuoCQLCAqTKw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jul 4, 2017 at 9:23 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> regression=# explain analyze select * from tenk1 where thousand < 10;
> before:
> Bitmap Heap Scan on tenk1 (cost=5.14..241.38 rows=110 width=244) (actual time=0.121..0.623 rows=100 loops=1)
> with patch:
> Bitmap Heap Scan on tenk1 (cost=5.06..227.42 rows=100 width=244) (actual time=0.054..0.300 rows=100 loops=1)
It's expected that the estimates will change with this patch. But I am
wondering why should actual times vary so much. May be that's just
accidental. Butthe actual timings are consistently lower with the
patch except the last one
>
> regression=# explain analyze select * from tenk1 where thousand between 10 and 10;
> before:
> Index Scan using tenk1_thous_tenthous on tenk1 (cost=0.29..8.30 rows=1 width=244) (actual time=0.041..0.112 rows=10 loops=1)
> with patch:
> Bitmap Heap Scan on tenk1 (cost=4.39..39.52 rows=10 width=244) (actual time=0.074..0.142 rows=10 loops=1)
The actual time has increased even though estimation is correct.
Those differences may just vanish if we take average of multiple runs
and are not that important to ponder about.
--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Khandekar | 2017-07-04 09:53:05 | Re: UPDATE of partition key |
Previous Message | Amit Kapila | 2017-07-04 09:19:26 | Re: hash index on unlogged tables doesn't behave as expected |