Re: [GENERAL] (Select *) vs. (Select id) from table.

2006-01-08 Thread Doug McNaught
Scott Ribe <[EMAIL PROTECTED]> 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.

Re: [GENERAL] (Select *) vs. (Select id) from table.

2006-01-08 Thread Scott Ribe
> 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_

Re: [GENERAL] (Select *) vs. (Select id) from table.

2006-01-08 Thread Uwe C. Schroeder
On Saturday 07 January 2006 13:50, Michael Trausch wrote: > Mike wrote: > > Hi, > > > > I am trying to make a website where scalability matters. In my quest to > > make my website more scalable I broke down the following SQL statement: > > > > select * from customers limit 100 > > > > to: > > > > s

Re: [GENERAL] (Select *) vs. (Select id) from table.

2006-01-08 Thread Greg Stark
Michael Trausch <[EMAIL PROTECTED]> writes: > Well, first, it's never really a good idea to use "SELECT * FROM" in a > production application, against a table. Tables can (and do) change > from one release to another, and if the layout of the table changes, you > could be looking at having to re

Re: [GENERAL] (Select *) vs. (Select id) from table.

2006-01-08 Thread Michael Trausch
Mike wrote: > Hi, > > I am trying to make a website where scalability matters. In my quest to > make my website more scalable I broke down the following SQL statement: > > select * from customers limit 100 > > to: > > select id, updated_date from customers limit 100 > > Then my application wou