Re: Extra cost of "lossy mode" Bitmap Scan plan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Extra cost of "lossy mode" Bitmap Scan plan
Дата
Msg-id 16737.1241703976@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Extra cost of "lossy mode" Bitmap Scan plan  (higepon <higepon@gmail.com>)
Ответы Re: Extra cost of "lossy mode" Bitmap Scan plan  (higepon <higepon@gmail.com>)
Список pgsql-hackers
higepon <higepon@gmail.com> writes:
> But I don't understand this case.
>  select * from emp where emp_no > 10000;
> Is Bitmap Scan is faster than Index Scan in this case ?

Yes, very probably, if a lot of tuples are being retrieved.  A bitmap
scan will fetch the tuples from the heap in a more or less optimal
fashion --- for instance, each page is read only once.  Index scan will
result in a random sequence of accesses to the heap.  (Of course, it
might have some order if the index is well correlated with the heap
order, but most of the time that's not true.)
        regards, tom lane


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

Предыдущее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Serializable Isolation without blocking
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: create if not exists (CINE)