[vhffs-dev] [483] Add an index on vhffs_dns. domain because mydns use it in its where condition |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 483
Author: gradator
Date: 2007-02-18 21:56:56 +0000 (Sun, 18 Feb 2007)
Log Message:
-----------
Add an index on vhffs_dns.domain because mydns use it in its where condition
Modified Paths:
--------------
branches/vhffs_4.1/vhffs-backend/src/pgsql/initdb.sql
branches/vhffs_4.1/vhffs-compat/4.0.sql
Modified: branches/vhffs_4.1/vhffs-backend/src/pgsql/initdb.sql
===================================================================
--- branches/vhffs_4.1/vhffs-backend/src/pgsql/initdb.sql 2007-02-18 21:42:15 UTC (rev 482)
+++ branches/vhffs_4.1/vhffs-backend/src/pgsql/initdb.sql 2007-02-18 21:56:56 UTC (rev 483)
@@ -310,6 +310,8 @@
CREATE INDEX idx_vhffs_httpd_servername_firstletter ON vhffs_httpd(substr(servername, 1, 1));
-- state is massively used in WHERE clause, this index improves overall performances
CREATE INDEX idx_vhffs_object_state ON vhffs_object(state);
+-- This index drastically improves performances for mydns
+CREATE INDEX idx_vhffs_dns_domain ON vhffs_dns(domain);
/****** Non primary key constraints.
Defining foreign keys here allow to create tables in any order.
Modified: branches/vhffs_4.1/vhffs-compat/4.0.sql
===================================================================
--- branches/vhffs_4.1/vhffs-compat/4.0.sql 2007-02-18 21:42:15 UTC (rev 482)
+++ branches/vhffs_4.1/vhffs-compat/4.0.sql 2007-02-18 21:56:56 UTC (rev 483)
@@ -201,3 +201,8 @@
SELECT users.username, users.passwd, users.firstname, users.lastname, users.mail, users.date_creation, object.state
FROM vhffs_users users, vhffs_object object
WHERE object.object_id=users.object_id;
+
+-- create somes index that improve overall performances
+CREATE INDEX idx_vhffs_httpd_servername_firstletter ON vhffs_httpd(substr(servername, 1, 1));
+CREATE INDEX idx_vhffs_object_state ON vhffs_object(state);
+CREATE INDEX idx_vhffs_dns_domain ON vhffs_dns(domain);