Re: Synchronized scans

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Synchronized scans
Дата
Msg-id 466421EF.4080304@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Synchronized scans  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Synchronized scans  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-patches
Tom Lane wrote:
> Heikki Linnakangas <heikki@enterprisedb.com> writes:
>> For the record, this patch has a small negative impact on scans like
>> "SELECT * FROM foo LIMIT 1000". If such a scan is run repeatedly, in CVS
>> HEAD the first 1000 rows will stay in buffer cache, but with the patch
>> each scan will start from roughly where previous one stopped, requiring
>> more pages to be read from disk each time. I don't think it's something
>> to worry about in practice, but I thought I'd mention it.
>
> Urgh.  The answers change depending on (more or less) the phase of the
> moon?  I've got a serious problem with that.  You might look back to
> 1997 when GEQO very nearly got tossed out entirely because it destroyed
> reproducibility of query results.

That's a very fundamental result of this patch, unfortunately. It only
happens on scans on tables larger than the threshold. And because we
only report the current scan location every 128KB, if you repeat the
same SELECT .. LIMIT X query with no other scanners on that table,
you'll get the same results as long as X is smaller than 128KB.

I thought we've been through this issue already...

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Synchronized scans
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Synchronized scans