Question about explain of index scan

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Question about explain of index scan
Дата
Msg-id 1125642986.5013.39.camel@fuji.krosing.net
обсуждение исходный текст
Ответы Re: Question about explain of index scan  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
How does Index scan perform a scan for overlapping Index Cond ?

If I get a plan like this, what will actually be performed if EXPLAIN
shows this:
Sort  (cost=12.90..12.91 rows=1 width=207)  Sort Key: log_actionseq  ->  Index Scan using sl_log_1_idx2_hu,
sl_log_1_idx2_hu,
sl_log_1_idx2_hu, sl_log_1_idx2_hu on sl_log_1  (cost=0.00..12.89 rows=1
width=207)        Index Cond: (  ((log_xid < '1349053093') AND (log_xid >= '1349052761')) 
OR ((log_xid < '1349053093') AND (log_xid >= '1349052761')) 
OR ((log_xid < '1349053093') AND (log_xid >= '1349052761')) 
OR ((log_xid < '1349053093') AND (log_xid >= '1349052761'))                    )

(this is from a query generated by Slony for 4 sets replicated from the
same master)

Will the same range be scanned 4 times ?

Or is the scan method smart enough to collapse them into one pass ?

Or does this actually mean 4 conactenated index scans (Index Scan using
X, X, X, X on sl_log_1) ?

-- 
Hannu Krosing <hannu@skype.net>



В списке pgsql-hackers по дате отправления:

Предыдущее
От: ITAGAKI Takahiro
Дата:
Сообщение: Re: Two different defs of MAX_TUPLES_PER_PAGE
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Proof of concept COLLATE support with patch