MySQL Forums :: Newbie :: How can I optimize this Code?


Advanced Search

How can I optimize this Code?
Posted by: Roman Arnold ()
Date: June 30, 2012 05:45AM

The following request needs up to ten seconds:

$sql3 = "SELECT DISTINCT(record)
FROM
jos_facileforms_subrecords, jos_facileforms_records
WHERE
jos_facileforms_subrecords.value
LIKE
'%$bereich%'
AND
jos_facileforms_subrecords.name = 'auswahlliste_bereich'
" . $sql_Personalvermittlung . "
" . $sql_region . "
" . $sql_arbeitszeit . "
AND
jos_facileforms_subrecords.record = jos_facileforms_records.id
AND
jos_facileforms_records.viewed = 1
ORDER BY
record
DESC";

the variables like "sql_Personalvermittlung" contains:

AND
record
IN
(SELECT DISTINCT(record)
FROM
jos_facileforms_subrecords
WHERE
value
LIKE
'%Personalvermittlung%'
AND
name = 'angebot')

The Table jos_facileforms_subrecords contains more then 18.000 entries. Can somebody help me. Sorry for my bad english!

Kind regards
Overtone



Edited 1 time(s). Last edit at 07/05/2012 10:41AM by Roman Arnold.

Options: ReplyQuote


Subject Written By Posted
How can I optimize this Code? Roman Arnold 06/30/2012 05:45AM
Re: How kan I optimize this Code? laptop alias 06/30/2012 07:16PM
Re: How kan I optimize this Code? Roman Arnold 07/01/2012 06:51AM
Re: How kan I optimize this Code? Peter Brawley 07/01/2012 07:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.