From 4ae396d4f6aad43d2b5ce3a16c1a2a5b3088df54 Mon Sep 17 00:00:00 2001 From: petter Date: Mon, 23 Feb 2009 07:17:20 +0000 Subject: [PATCH] Gain some speed by at least creating index on the stat table git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3805 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-tools/webgui/create_db_data.pl | 3 +++ varnish-tools/webgui/varnish_webgui.sql | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/varnish-tools/webgui/create_db_data.pl b/varnish-tools/webgui/create_db_data.pl index acec4a44..627851d1 100755 --- a/varnish-tools/webgui/create_db_data.pl +++ b/varnish-tools/webgui/create_db_data.pl @@ -111,6 +111,9 @@ CREATE TABLE parameter_info( description TEXT ); +CREATE INDEX stat_time ON stat(time); +CREATE INDEX stat_node_id ON stat(node_id); + INSERT INTO node_group VALUES(0, 0, 'Standalone'); $parameter_info_sql diff --git a/varnish-tools/webgui/varnish_webgui.sql b/varnish-tools/webgui/varnish_webgui.sql index b7b750f3..6741db9f 100644 --- a/varnish-tools/webgui/varnish_webgui.sql +++ b/varnish-tools/webgui/varnish_webgui.sql @@ -1,4 +1,4 @@ --- This file was auto generated Wed Feb 18 15:58:37 2009 by create_db_files.pl +-- This file was auto generated Mon Feb 23 08:16:23 2009 by create_db_files.pl DROP TABLE node_group; DROP TABLE node; DROP TABLE stat; @@ -188,6 +188,9 @@ CREATE TABLE parameter_info( description TEXT ); +CREATE INDEX stat_time ON stat(time); +CREATE INDEX stat_node_id ON stat(node_id); + INSERT INTO node_group VALUES(0, 0, 'Standalone'); INSERT INTO parameter_info VALUES('accept_fd_holdoff', 'ms', 'Default is 50. If we run out of file descriptors, the accept thread will sleep. This parameter control for how long it will sleep. NB: We do not know yet if it is a good idea to change this parameter, or if the default value is even sensible. Caution is advised, and feedback is most welcome. '); -- 2.39.5