The OR conditions require a full table scan everytime this is called.
You didn't say how many rows you had, nor if there were indexes on
your various phone_xxx fields. If you do, you should get some value
by approaching it as a UNION
select count(id)from (
select id from leads where phone_work
Dear all,
I have a query that takes a rather long time and was wondering if there is
anyway to optimize it.
Normally we removing duplicate records by phone number. This query takes about
a
second and
it really slows down the process when we are importing several 1000 records a
day.
Here is
Hi,
We log all sessions on our webserver to a table, and then periodically run a
batch process to analyze the visitors ip addresses to determine the
city/region/country of origin.
we use MySQL 4.1.1-alpha-standard-log on Redhat AS, installed from the mysql
RPM.
The query below takes about 1 seco