Re: Howto optimize Distinct query over 1.3mil rows?

2010-09-28 Thread John Stoffel
Johnny> BIB_ID is VARCHAR, you should probably try Johnny> WHERE BIB_ID='464' so MySQL treats the value as a string Wow! What a difference that makes! Time to A) update my queries, or B) fix the DB schema to NOT use varchar there. mysql> select SQL_NO_CACHE distinct(Call_No) from Newspap

Howto optimize Distinct query over 1.3mil rows?

2010-09-28 Thread John Stoffel
Hi, I'm running MySQL 5.0.51a-24+lenny3-log on a Debian Lenny box with 2Gb of RAM and a pair of dual core 2.6Ghz CPUs. I'm using a pair of 40Gb disks mirrored using MD (Linux software RAID) for both the OS and the storage of the mysql DBs. My problem child is doing this simple query: mys

Re: [PHP-DB] Need For SPEED

2003-08-21 Thread John Stoffel
What are your mysql settings like as well? You can tune them up quite a bit since your import will be the big problem at first, but then it will mostly be just reads on the tables when you send out emails. John John Stoffel - Senior Unix Systems Administrator - Lucent Technologies [E