aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-10 18:55:56 -0700
committerfriendica <info@friendica.com>2015-03-10 18:55:56 -0700
commit9d1df58759b4eff9439c12d081ba5e1264f900a3 (patch)
treefc5887cadac67eed6b52abb4d04787a4622b5bdf /install
parentb0a78e528867b6db8d2c0b690424c4096fb33377 (diff)
downloadvolse-hubzilla-9d1df58759b4eff9439c12d081ba5e1264f900a3.tar.gz
volse-hubzilla-9d1df58759b4eff9439c12d081ba5e1264f900a3.tar.bz2
volse-hubzilla-9d1df58759b4eff9439c12d081ba5e1264f900a3.zip
sql optimisation for affinity searches. A new index was added which wasn't added retro-actively to existing DBs as an update. It isn't clear if this helps sites any more than just restricting the abook table to certain channel_id's is (and this field is already indexed).
Diffstat (limited to 'install')
-rw-r--r--install/schema_mysql.sql3
-rw-r--r--install/schema_postgres.sql1
2 files changed, 3 insertions, 1 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 4e481f5c0..3567085ce 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -33,7 +33,8 @@ CREATE TABLE IF NOT EXISTS `abook` (
KEY `abook_profile` (`abook_profile`),
KEY `abook_dob` (`abook_dob`),
KEY `abook_connected` (`abook_connected`),
- KEY `abook_rating` (`abook_rating`)
+ KEY `abook_rating` (`abook_rating`),
+ KEY `abook_channel_closeness` (`book_channel`,`abook_closeness`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index 20285a352..bc72be445 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -29,6 +29,7 @@ CREATE TABLE "abook" (
create index "abook_dob" on abook ("abook_dob");
create index "abook_connected" on abook ("abook_connected");
create index "abook_rating" on abook ("abook_rating");
+ create index "abook_channel_closeness" on abook ("abook_channel", "abook_closeness");
CREATE TABLE "account" (
"account_id" serial NOT NULL,