eZ Community » Forums » Setup & design » Poor search performance
expandshrink

Poor search performance

Poor search performance

Friday 13 June 2003 4:39:16 am - 5 replies

Hi.

I'm trying ezpublish 3.1.0-2 with mysql-4.0.12, php-4.2.3 and apache 1.3.27. If I use the search facility (from admin design, by exmaple) looking for "the thing" (including the quotation marks) the mysql-server gets a very high load for a long time...

Any obvious optimization hints?

Modified on Friday 13 June 2003 4:46:18 am by Roberto Moreda Álvarez

Friday 13 June 2003 8:26:20 am

How big is your database? Normally the search should be very fast.

--bård

Friday 13 June 2003 11:56:05 am

Need more testing... The problem is narrowed to searchs where one word have latin1 characters like "ñ" (it works with other like "áéíóú"blunk.gif Emoticon.
In case of a single word with "ñ" the search result is always 0, and in case of "the thingñ" the mysql thread simply hangs using 100% of cpu.

Friday 13 June 2003 12:28:14 pm

Please let us know what you find. I know there are some problems with those characters, but I haven't seen a performance impact because of it.

--bård

Sunday 15 June 2003 1:04:31 am

Hi!
Two findings about my problems with search:

- The performance problem it's related to a incorrect join planification in mysql under certain circunstances. In ezsearchengine.php, the SELECT JOINs, when we populate the temporary table, are executed in a suboptimal order. To overcome this I have rewrited the SQL sentences using "LEFT JOIN" constructs to force a join order execution. This solved the problem. Now the searches are fast as expected.

- The problem related with the search of words with latin1 characters are due to the mysql treatment of string comparison. This leads to situations where "españa" is equal to "espana" for mysql sad.gif Emoticon. This is a problem with words that have different meaning depending on a "ñ" or "n" character...
The solution is to declare the phrase and word fields as "BINARY" in mysql creation tables.

I have a patch for both cases. If it can be useful I'll send it to some email address.
Regards.

Rober

Wednesday 18 June 2003 11:16:20 am

Hola Roberto!

Could you send this patch to Contributions area? I need it for this portal that is coming up... It's Finnish/Spanish/Swedish, so I need the special characters to work in search...

Regards,
Jerry

Modified on Wednesday 18 June 2003 11:18:14 am by Jerry Jalava

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from