Search Postgresql Archives

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

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

 



> 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. But in the original example:

select id, updated_date from customers limit 100

Sybase, for instance, would not use table pages at all if there were an
index covering id & updated_date.


-- 
Scott Ribe
scott_ribe@xxxxxxxxxxxxxxx
http://www.killerbytes.com/
(303) 665-7007 voice




[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