Quote:
Originally Posted by putts
When you do a * then the database has to hit the schema to determine the column list that it needs to pull. Same thing goes for using nulls in a database as opposed to ''. If a column is set to allow nulls then every insert/update to the column requires certain checks against the database that add to general overhead.
|
interesting... now that is a stronger argument than anything else I've read so far in this thread.
However, I do think that PHP/MySQL(i) works with the results from a query differently to ASP/MS SQL...
still - I can see that there will still be some overhead in the database itself.
Quote:
|
Originally Posted by erisco
Horus_Kol, if the database is changed most corruptions will be spotted by an error in the query. If a column name changes your query will fail and you can get the error message back as to what went wrong. If you use * this is impossible. The same is with added or removed columns. It is much easier to see this in a specific error message back from the database than it is to see in an arbitrary error later on in your code.
|
That's all well and good, but if your application is expecting some data from your dataobject to be named 'xyz', then it doesn't really matter that you got the column name right in the query itself, you're still gonna get an error if you remove that particular field from your table - just not at the query.
so I don't really see the strength of this statement, I'm afraid - but hey, maybe its just down to the way I code, and it works for me.
Quote:
|
Originally Posted by erisco
It is also a weak assumption that order doesn't matter, because any given application may require it where the keys are not known. Sure, order doesn't matter for the majority of cases, but you cannot rule it out completely.
|
Did I say doesn't? Meant to say shouldn't...