Upgrade script for Bookmark uses joins instead of exists (performance++)

This commit is contained in:
Mikael Nordfeldth 2016-03-29 12:48:00 +02:00
parent dcffe5d992
commit f8765c6166

View File

@ -355,8 +355,8 @@ class BookmarkPlugin extends MicroAppPlugin
$notice = new Notice();
$notice->whereAdd('exists (select uri from bookmark where bookmark.uri = notice.uri)');
$notice->whereAdd('((object_type is null) or (object_type = "' .ActivityObject::NOTE.'"))');
$notice->joinAdd(array('uri', 'bookmark:uri'));
$notice->whereAdd('object_type IS NULL OR object_type = '.$notice->escape(ActivityObject::NOTE));
$notice->find();