?
avatar javigomez
javigomez
14 Nov 2014

Hi, I just saw this in my debug:

screen shot 2014-11-14 at 13 15 55

I checked and the Indexes in this table are:

screen shot 2014-11-14 at 13 16 34

I'm not skilled in query performance but I was wondering if we can add some Indexes to "enabled", "type", "state"...

What do you think?

cc: @beat @gunjanpatel, @nadeeshaan, @alikon, @aschkenasy, @mrunalpittalia, and rest of members of the http://docs.joomla.org/SQL_Optimisation_Working_Group

avatar javigomez javigomez - open - 14 Nov 2014
avatar jissues-bot jissues-bot - change - 14 Nov 2014
Labels Added: ?
avatar aschkenasy
aschkenasy - comment - 14 Nov 2014

State can't be indexed (index will not help.) Since it's a range lookup.
Type is already indexed as first element of the extension index. I fear that the range lookup of enabled is preventing the query optimizer to do use the index.

On November 14, 2014 7:18:52 AM EST, javier gomez notifications@github.com wrote:

Hi, I just saw this in my debug:

screen shot 2014-11-14 at 13 15<br>
55

I checked and the Indexes in this table are:

screen shot 2014-11-14 at 13 16<br>
34

I'm not skilled in query performance but I was wondering if we can add
some Indexes to "enabled", "type", "state"...

What do you think?

cc: @beat @gunjanpatel, @nadeeshaan, @alikon, @aschkenasy,
@mrunalpittalia, and rest of members of the
http://docs.joomla.org/SQL_Optimisation_Working_Group


Reply to this email directly or view it on GitHub:
#5101

Sent from my mobile device. Please excuse my brevity.

avatar Bakual
Bakual - comment - 14 Nov 2014

It should work if the query is changed to AND state IN (0,1), right? Then state could be indexed and it could be used.

However I wonder what the purpose of that column is. In my test database this value is always 0. We don't use a state there to my knowledge. We use the enabled column instead.

avatar aschkenasy
aschkenasy - comment - 14 Nov 2014

State in is perfect.
Likewise any finite option should be
IN(1,2,3,...)

On November 14, 2014 10:00:57 AM EST, Thomas Hunziker notifications@github.com wrote:

It should work if the query is changed to AND state IN (0,1), right?
Then state could be indexed and it could be used.

However I wonder what the purpose of that column is. In my test
database this value is always 0. We don't use a state there to my
knowledge. We use the enabled column instead.


Reply to this email directly or view it on GitHub:
#5101 (comment)

Sent from my mobile device. Please excuse my brevity.

avatar brianteeman brianteeman - change - 14 Nov 2014
Category SQL
avatar Hackwar
Hackwar - comment - 16 Nov 2014

See #5120

avatar Bakual Bakual - close - 21 Nov 2014
avatar Bakual Bakual - change - 21 Nov 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-11-21 06:49:10

Add a Comment

Login with GitHub to post a comment