Page MenuHomePhabricator

Error: Too many results!
Closed, ResolvedPublic

Description

USE commonswiki_p;
SELECT	CONCAT('File:', img_name) AS 'File name', DATE_FORMAT(img_timestamp, '%Y-%m-%d %T') AS 'Date', img_size AS 'Size',
		CONCAT('User:', img_user_text) AS 'Uploader\'s name' FROM image
	WHERE img_timestamp>=20180324000000 AND (img_minor_mime='png' OR img_minor_mime='svg+xml')
		AND img_name REGEXP '([Ff]lag|[Bb]andei?ra|[Dd]rapeau)'
	ORDER BY img_minor_mime DESC, img_timestamp DESC;

Normally I run the query above 2–3 times a day ( of course changing the timestamp accordingly for a current day). The expected resultset size is less than 20 rows. Unfortunately, for about 10 days I have been getting the following message:

Too many results! Did you add some conditions or a limit to the number of results? If you want tens of thousands or more results, such as the titles of all articles, Wikimedia Dumps at dumps.wikimedia.org will be a better option.

It pops up at random moments, i.e. sometimes the query finishes successfully and sometimes the message pops up. I have tried to add something like LIMIT 100 but it changes nothing.

Event Timeline

zhuyifei1999 triaged this task as High priority.
zhuyifei1999 subscribed.

I thought I reverted the change...

In T188564#4055351 the save limit was set to 10 mins. It's enough to cause an OOM, yet it's not enough to save 20 rows?! @Halfak ideas?

@Jdx https://quarry.wmflabs.org/query/21900 is killed by the restart. Please rerun. The real issue shall be tracked in T188564