Re: Range Types - efficiency
| От | Florian Weimer |
|---|---|
| Тема | Re: Range Types - efficiency |
| Дата | |
| Msg-id | 82vd0suryq.fsf@mid.bfk.de обсуждение исходный текст |
| Ответ на | Range Types - efficiency (Chris Browne <cbbrowne@acm.org>) |
| Список | pgsql-hackers |
* Chris Browne:
> The RangeType-based equivalent is the following:
>
> rangetest@localhost-> explain analyze select * from some_data where '[2010-01-01,2010-02-01)'::daterange @> whensit;
> QUERY PLAN
> ---------------------------------------------------------------------------------------------------------
> Seq Scan on some_data (cost=0.00..634.00 rows=1 width=8) (actual time=1.045..111.739 rows=390 loops=1)
> Filter: ('[ 2010-01-01, 2010-02-01 )'::daterange @> whensit)
> Total runtime: 111.780 ms
> (3 rows)
>
> This, alas, reverts to a seq scan on the table, rather than restricting
> itself to the tuples of interest.
This is quite similar to LIKE and regexp matches. The backend has a
kludge to use the index in such cases. It did not seem extensible to
me last time I looked, unfortunately.
--
Florian Weimer <fweimer@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99
В списке pgsql-hackers по дате отправления: