From 9d1df58759b4eff9439c12d081ba5e1264f900a3 Mon Sep 17 00:00:00 2001
From: friendica <info@friendica.com>
Date: Tue, 10 Mar 2015 18:55:56 -0700
Subject: 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).

---
 install/schema_postgres.sql | 1 +
 1 file changed, 1 insertion(+)

(limited to 'install/schema_postgres.sql')

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,
-- 
cgit v1.2.3

