Page MenuHomePhabricator

QueryBloat in page histories
Closed, ResolvedPublic

Description

Viewing history of the main page at translatewiki.net I see 100 identical queries:

0.9479 Query 227 (slave): SELECT /* Title::getNotificationTimestamp Nike */ wl_notificationtimestamp FROM bw_watchlist WHERE wl_namespace = '0' AND wl_title = 'Main_Page' AND wl_user = '1' LIMIT 1


Version: 1.18.x
Severity: normal

Details

Reference
bz27333

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:25 PM
bzimport set Reference to bz27333.

Fixed in r82004. Title::getNotificationTimestamp() has an internal cache for this which it keeps on the title object, but null entries in the cache were being accidentally ignored due to the way it was checking its cache with isset().

I switched it to use array_key_exists(), which doesn't have this problem, and we now only get a single query issued.