diff roundup/backends/back_postgresql.py @ 3858:bb30bbfc7cdd

Indexing fixes. - Add new rdbms-indexes to the tables for the full-text index. These speed up adding new entries and finding old ones to remove. - Remove getprops method from FileClass in backends/rdbms_common: This forced indexing for the content property even if the user decided to turn it off for a FileClass instance.
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Thu, 21 Jun 2007 07:35:51 +0000
parents f1363e19121a
children 1d47f70a99bf
line wrap: on
line diff
--- a/roundup/backends/back_postgresql.py	Wed May 16 09:42:36 2007 +0000
+++ b/roundup/backends/back_postgresql.py	Thu Jun 21 07:35:51 2007 +0000
@@ -1,4 +1,4 @@
-#$Id: back_postgresql.py,v 1.37 2006-11-09 00:55:33 richard Exp $
+#$Id: back_postgresql.py,v 1.38 2007-06-21 07:35:50 schlatterbeck Exp $
 #
 # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt>
 #
@@ -161,6 +161,9 @@
         self.sql('''CREATE TABLE __words (_word VARCHAR(30), 
             _textid integer)''')
         self.sql('CREATE INDEX words_word_idx ON __words(_word)')
+        self.sql('CREATE INDEX words_by_id ON __words (_textid)')
+        self.sql('CREATE UNIQUE INDEX __textids_by_props ON '
+                 '__textids (_class, _itemid, _prop)')
 
     def fix_version_2_tables(self):
         # Convert journal date column to TIMESTAMP, params column to TEXT

Roundup Issue Tracker: http://roundup-tracker.org/