Smarter way to create unique indexes

This commit is contained in:
Michael 2017-01-15 23:30:43 +00:00
commit ced7cb6828
3 changed files with 89 additions and 17 deletions

View file

@ -194,7 +194,7 @@ class dfrn {
`contact`.`name-date`, `contact`.`uri-date`, `contact`.`avatar-date`,
`contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
`sign`.`signed_text`, `sign`.`signature`, `sign`.`signer`
FROM `item` USE INDEX (`uid_wall_changed`, `wall_uid_changed`) $sql_post_table
FROM `item` USE INDEX (`uid_wall_changed`) $sql_post_table
STRAIGHT_JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
AND (NOT `contact`.`blocked` OR `contact`.`pending`)
LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id`