Steps to replicate the issue (include links if applicable):
- Login to wm superset and open sqllab ( https://superset.wmcloud.org/sqllab/ )
- Select s4 as database and commonswiki_p as schema
- run query select gil_wiki from globalimagelinks group by gil_wiki
What happens?:
query timeouts.
Even with limit it is still slow, though it will run it
select gil_wiki from globalimagelinks group by gil_wiki limit 100
What should have happened instead?:
It should be almost instant. When running the query in SQL (mariadb console, quarry etc) it takes <1s. Example: Quarry: 83949.
Also modifying the query in superset as subquery like this makes it almost instant in superset.wmcloud.org too:
SELECT * FROM (select gil_wiki from globalimagelinks group by gil_wiki) AS t