Re: patch for between symmetric, asymmetric (from TODO)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: patch for between symmetric, asymmetric (from TODO)
Date: 2005-06-01 16:02:29
Message-ID: 14676.1117641749@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz> writes:
> Bitmap Heap Scan on fx (cost=12.00..473.00 rows=998 width=4) (actual
> time=0.516..3.855 rows=1035 loops=1)
> Recheck Cond: (((i >= 1) AND (i <= 10)) OR ((i >= 10) AND (i <= 1)))
> -> BitmapOr (cost=12.00..12.00 rows=1000 width=0) (actual
> time=0.377..0.377 rows=0 loops=1)
> -> Bitmap Index Scan on fxxx (cost=0.00..6.00 rows=500 width=0)
> (actual time=0.362..0.362 rows=1035 loops=1)
> Index Cond: ((i >= 1) AND (i <= 10))
> -> Bitmap Index Scan on fxxx (cost=0.00..6.00 rows=500 width=0)
> (actual time=0.007..0.007 rows=0 loops=1)
> Index Cond: ((i >= 10) AND (i <= 1))
> Total runtime: 6.412 ms

> better is sort operands before and next test. Without it, between produce
> condition which is allways false. But planner dont recognize it.

No, but the btree index code does --- notice the very small actual time
there. I don't think there's anything seriously wrong with the above
plan.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Pavel Stehule 2005-06-01 18:05:41 patch between symmetric (add doc)
Previous Message Pavel Stehule 2005-06-01 15:53:29 Re: patch for between symmetric, asymmetric (from TODO)