Upgrade script for Bookmark uses joins instead of exists (performance++)
This commit is contained in:
parent
dcffe5d992
commit
f8765c6166
@ -355,8 +355,8 @@ class BookmarkPlugin extends MicroAppPlugin
|
|||||||
|
|
||||||
$notice = new Notice();
|
$notice = new Notice();
|
||||||
|
|
||||||
$notice->whereAdd('exists (select uri from bookmark where bookmark.uri = notice.uri)');
|
$notice->joinAdd(array('uri', 'bookmark:uri'));
|
||||||
$notice->whereAdd('((object_type is null) or (object_type = "' .ActivityObject::NOTE.'"))');
|
$notice->whereAdd('object_type IS NULL OR object_type = '.$notice->escape(ActivityObject::NOTE));
|
||||||
|
|
||||||
$notice->find();
|
$notice->find();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user