View Single Post
Old 11-25-2012, 04:32 PM   PM User | #7
shoryuken
New Coder

 
Join Date: May 2012
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
shoryuken is an unknown quantity at this point
Hi,

Thanks again for the input. I just tried it with INT matching as you suggested but this benchmarks the same as with the apostrophes so I guess mysql is correcting the query before processing.

Also, I just tried your other idea creating another column called visible2 and populated that with INT 1 /0, added index but the query still scans 2 million rows.

I am not sure about connection pooling - that's new to me - I'll read up on it, but I am only connecting to the DB one time per pageview. I'm using Amazon AWS RDS on default settings. Btw, this query is run only occassionally and I then cache it in memcached to prevent repeat visits from hammering the DB. But, 80% are cache misses as they are new customers. It's just a sloooow query, and I need that visible flag.

Thanks for your help so far
shoryuken is offline   Reply With Quote