Sackgesicht VIP
Total posts: 1,636
20 Oct 2013 20:56

Search mode : "%LIKE%"

If a query does not return a result, still unnecessary queries are done.

I used a section with 59K records, the fieldsdata of those records contains only a 6 digit number.

To find out that there is no result it takes 1000 ms.

This could be reduced to 200ms, if the 3 additional queries are not being processed.

The first count query (See query 17 below) should be enough since it shows, that there are no records.

How much more if this section would contain articles with extensive description?

Btw, a fulltext search would only take 1ms ... :D

Improvement would be:

If no result, don't query further ...

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,748
21 Oct 2013 08:03

At first I was very happy that I'll fix it. But, unfortunately in Joomla I need Total before I get list. And in Cobalt I use customized items retrieval that do not allow me to change it without changing logic which I would not like to do in Cobalt 8.

And somehow those 4 queries have to be 2 actually. You have every query doubled. Not sure why.


Sackgesicht VIP
Total posts: 1,636
21 Oct 2013 08:33

You have every query doubled. Not sure why.

This happens when you query for something which does not exist .. example "xxxxxxxxxxxx" .. see query in screen shot .. if there is a result, there is no double query

Powered by Cobalt