Topic on Talk:Quarry

Smartse (talkcontribs)

Can anyone suggest a way to improve the performance of https://quarry.wmflabs.org/query/24717 ?

It seems like a relatively simple query - listing the revision lengths and times of a specific article - but while it ran yesterday (very slowly), today it failed completely.

Zhuyifei1999 (talkcontribs)
Smartse (talkcontribs)

I don't know what that means but I can see how it's an improvement! It also helps if I use an article that I didn't delete yesterday!

Smartse (talkcontribs)

Sorry for being an SQL noob, but does this mean that in general it is faster if you use more 'and' statements? I can see how searching for the title in this case might be slow, so does setting "page_namespace=0" mean that the table is quickly shortened and then only that is searched for the title, rather than all 7 million rows? The simpleton in me thought that more statements would be slower.

Zhuyifei1999 (talkcontribs)

It depends on what you are searching on. In this case, the name_title UNIQUE INDEX means that there can be at most one row that match both the page title and namespace, and finishes the search once a single row is found. There are also special areas / code / storage optimized for searching when both namespace and title are specified.

Smartse (talkcontribs)

That makes more sense. Thanks for your help.