cost of querys

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
howardr
Forum Newbie
Posts: 17
Joined: Mon Oct 31, 2005 1:33 pm

cost of querys

Post by howardr »

I have a MySQL table with about 20 columns. If I select one row from the name with * (ex: "SELECT * FROM table WHERE id='1' LIMIT 0, 1"), how much more costly is this than a slection where I specifically specify which columns I want (ex: "SELECT name, email, phone, address FROM table WHERE id='1' LIMIT 0,1")?

Is there website that explains this kind of stuff for other types of queries in MySQL?

Is there any code that someone has written where if i put it on the btotom of my page, it would print out how many trips to the database it made? I could just count it up, but with certain pages having different includes it owuld be easier if code existed.
Post Reply