add a few more sql indexes

This commit is contained in:
friendica 2011-11-15 23:12:56 -08:00
parent 3bd2b731b2
commit 7b58de743a
3 changed files with 12 additions and 3 deletions

View File

@ -11,7 +11,7 @@ require_once('include/cache.php');
define ( 'FRIENDIKA_PLATFORM', 'Friendica');
define ( 'FRIENDIKA_VERSION', '2.3.1166' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1103 );
define ( 'DB_UPDATE_VERSION', 1104 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View File

@ -113,7 +113,8 @@ CREATE TABLE IF NOT EXISTS `contact` (
KEY `issued-id` (`issued-id`),
KEY `dfrn-id` (`dfrn-id`),
KEY `blocked` (`blocked`),
KEY `readonly` (`readonly`)
KEY `readonly` (`readonly`),
KEY `pending` (`pending`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
@ -245,8 +246,10 @@ CREATE TABLE IF NOT EXISTS `item` (
KEY `origin` (`origin`),
KEY `last-child` (`last-child`),
KEY `unseen` (`unseen`),
KEY `wall` (`wall`),
FULLTEXT KEY `title` (`title`),
FULLTEXT KEY `body` (`body`),
FULLTEXT KEY `tag` (`tag`),
FULLTEXT KEY `allow_cid` (`allow_cid`),
FULLTEXT KEY `allow_gid` (`allow_gid`),
FULLTEXT KEY `deny_cid` (`deny_cid`),
@ -441,6 +444,10 @@ CREATE TABLE IF NOT EXISTS `user` (
PRIMARY KEY (`uid`),
KEY `nickname` (`nickname`),
KEY `account_expired` (`account_expired`),
KEY `hidewall` (`hidewall`),
KEY `blockwall` (`blockwall`),
KEY `blocked` (`blocked`),
KEY `verified` (`verified`),
KEY `login_date` (`login_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View File

@ -455,7 +455,9 @@ function diaspora_request($importer,$xml) {
intval($importer['uid'])
);
if(count($self)) {
// they are not CONTACT_IS_FOLLOWER anymore but that's what we have in the array
if(count($self) && $contact['rel'] == CONTACT_IS_FOLLOWER) {
$arr = array();
$arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), $importer['uid']);