Mercurial > p > roundup > code
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 3857:54c10d188b8b | 3858:bb30bbfc7cdd |
|---|---|
| 1 #$Id: back_postgresql.py,v 1.37 2006-11-09 00:55:33 richard Exp $ | 1 #$Id: back_postgresql.py,v 1.38 2007-06-21 07:35:50 schlatterbeck Exp $ |
| 2 # | 2 # |
| 3 # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt> | 3 # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt> |
| 4 # | 4 # |
| 5 # This module is free software, and you may redistribute it and/or modify | 5 # This module is free software, and you may redistribute it and/or modify |
| 6 # under the same terms as Python, so long as this copyright message and | 6 # under the same terms as Python, so long as this copyright message and |
| 159 _textid integer primary key, _class VARCHAR(255), | 159 _textid integer primary key, _class VARCHAR(255), |
| 160 _itemid VARCHAR(255), _prop VARCHAR(255))''') | 160 _itemid VARCHAR(255), _prop VARCHAR(255))''') |
| 161 self.sql('''CREATE TABLE __words (_word VARCHAR(30), | 161 self.sql('''CREATE TABLE __words (_word VARCHAR(30), |
| 162 _textid integer)''') | 162 _textid integer)''') |
| 163 self.sql('CREATE INDEX words_word_idx ON __words(_word)') | 163 self.sql('CREATE INDEX words_word_idx ON __words(_word)') |
| 164 self.sql('CREATE INDEX words_by_id ON __words (_textid)') | |
| 165 self.sql('CREATE UNIQUE INDEX __textids_by_props ON ' | |
| 166 '__textids (_class, _itemid, _prop)') | |
| 164 | 167 |
| 165 def fix_version_2_tables(self): | 168 def fix_version_2_tables(self): |
| 166 # Convert journal date column to TIMESTAMP, params column to TEXT | 169 # Convert journal date column to TIMESTAMP, params column to TEXT |
| 167 self._convert_journal_tables() | 170 self._convert_journal_tables() |
| 168 | 171 |
