Hi Adrian

Somewhere in the back of my mind..I remember reading that if you are using
LIKE putting in wildcards for and aft e.g %string% slows down queries
somewhat....
I will have a look at my mySQL stuff and see if I can confirm...but if I
recall correctly, is there any way you can do away with one of the
wildcards?

Rory McKinley
Nebula Solutions
+27 82 857 2391
[EMAIL PROTECTED]
"There are 10 kinds of people in this world,
those who understand binary and those who don't" (Unknown)
----- Original Message ----- 
From: "Adrian Teasdale" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 14, 2003 12:54 AM
Subject: [PHP] Slow searches in large database


> Hi there
>
> Wondering if someone could help or give some advice.
>
> We have a mysql database that has approximately 20,000 records and has a
> total size of 125mb  There are approximately 25 fields that we need to
> search each time that someone performs a search.  We have installed
> TurckMMCache onto the server which speeded up the searching, but it
> still takes around 15 seconds for the results to be displayed.
>
> An example of one of our search strings is:
>
> select docs.* from docs where 1 and CY IN ('GB')  and (TI like
> '%searchstring%' or PD like '%searchstring%' or ND like '%searchstring%'
> or DR like '%searchstring%' or DS like '%searchstring%' or DD like
> '%searchstring%' or DT like '%searchstring%' or RN like '%searchstring%'
> or HD like '%searchstring%' or TD like '%searchstring%' or NC like
> '%searchstring%' or PR like '%searchstring%' or RP like '%searchstring%'
> or AA like '%searchstring%' or TY like '%searchstring%' or AC like
> '%searchstring%' or PC like '%searchstring%' or RC like '%searchstring%'
> or RG like '%searchstring%' or AU like '%searchstring%' or TW like
> '%searchstring%' or CO like '%searchstring%' or AB like '%searchstring%'
> or TX like '%searchstring%')
>
> Basically, is there anything that anyone can immediately suggest that we
> need to do to speed things up?
>
> Thanks
>
> Ade
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to