Re: (Select *) vs. (Select id) from table.

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: (Select *) vs. (Select id) from table.
Дата
Msg-id 87wtha6yvr.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на Re: (Select *) vs. (Select id) from table.  (Scott Ribe <scott_ribe@killerbytes.com>)
Список pgsql-general
Scott Ribe <scott_ribe@killerbytes.com> writes:

>> The time the DB needs to find the record
>> should be the same since the record has to be found before the resultset is
>> assembled.
>
> What if the query can be satisfied from an index? I don't know if PostgreSQL
> has this kind of optimization or not.

Nope.  Tuple visibility isn't stored in indexes, so it still has to
visit the heap to see if a row is visible to your transaction.

-Doug

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