Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Scott Ribe <scott_ribe@xxxxxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux