View Single Post
Old 04-02-2009, 08:54 PM   #9 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Village Idiot View Post
I use MS SQL at work, almost all our stuff is Microsoft.
Ok that explains it. I think with mysql, it is 32 columns. But whatever...or maybe what I read was that good coding practice was to keep it at 32? I know you mentioned you didn't design the table...



Quote:
Originally Posted by Kalle View Post
MySQL's count function by far, its faster and less memory intensive (I know a COUNT isn't the biggest deal) but still since PHP needs to do the same check as your database server already have done.
Sounds good. Each day goes by I try to pick up good coding practice. It's hard when you have bad habits for so long.




Here's another question for you guys that's kinda unrelated and I'm just throwing it out there.


Say you have 1,000,000 rows and you want the count.

And you have a regular flat file that has 1,000,000 lines.

Say both DB and flat file only has one type of data (one column).

Do you think the flat file will return faster via PHP or the DB will win out via SQL query...
allworknoplay is offline  
Reply With Quote