summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorDries Buytaert2003-08-27 05:49:52 (GMT)
committerDries Buytaert2003-08-27 05:49:52 (GMT)
commit89005902e44973f798cfa903742c0d8b99345ce0 (patch)
tree237f57b37a8d85907d121f118b0a9cbd2144f8fa /database
parent93fb265d478c06a6dcce25473f1f904095c5622a (diff)
- Tested and committed Kjartan's performance patches. (Fixed the access check
in update.php though.)
Diffstat (limited to 'database')
-rw-r--r--database/database.mysql11
-rw-r--r--database/database.pgsql9
2 files changed, 13 insertions, 7 deletions
diff --git a/database/database.mysql b/database/database.mysql
index e64bf68..94b7115 100644
--- a/database/database.mysql
+++ b/database/database.mysql
@@ -25,7 +25,8 @@ CREATE TABLE accesslog (
url varchar(255) default NULL,
hostname varchar(128) default NULL,
uid int(10) unsigned default '0',
- timestamp int(11) unsigned NOT NULL default '0'
+ timestamp int(11) unsigned NOT NULL default '0',
+ KEY accesslog_timestamp (timestamp)
) TYPE=MyISAM;
--
@@ -280,11 +281,13 @@ CREATE TABLE node (
revisions text NOT NULL,
static int(2) NOT NULL default '0',
PRIMARY KEY (nid),
- KEY type (type),
- KEY title (title,type),
- KEY promote (promote),
+ KEY node_type (type(4)),
+ KEY node_title_type (title,type(4)),
KEY status (status),
KEY uid (uid)
+ KEY node_moderate (moderate);
+ KEY node_path (path(5));
+ KEY node_promote_status (promote, status);
) TYPE=MyISAM;
--
diff --git a/database/database.pgsql b/database/database.pgsql
index 74b5cde..d98bfcd 100644
--- a/database/database.pgsql
+++ b/database/database.pgsql
@@ -25,6 +25,7 @@ CREATE TABLE accesslog (
uid integer default '0',
timestamp integer NOT NULL default '0'
);
+CREATE INDEX accesslog_timestamp_idx ON accesslog (timestamp);
--
-- Table structure for authmap
@@ -280,11 +281,13 @@ CREATE TABLE node (
static integer NOT NULL default '0',
PRIMARY KEY (nid)
);
-CREATE INDEX node_type_idx ON node(type);
-CREATE INDEX node_title_idx ON node(title,type);
-CREATE INDEX node_promote_idx ON node(promote);
+CREATE INDEX node_type_idx ON node(type(4));
+CREATE INDEX node_title_idx ON node(title,type(4));
CREATE INDEX node_status_idx ON node(status);
CREATE INDEX node_uid_idx ON node(uid);
+CREATE INDEX node_moderate_idx ON node (moderate);
+CREATE INDEX node_path_idx ON node (path(8));
+CREATE INDEX node_promote_status_idx ON node (promote, status);
--
-- Table structure for page