Hi,
I've been trying to create some indices:
1. an index on the discretecharstate_id column in matrixelement
2. an index on the matrixrow_id column in matrixelement
matrixelement is the largest table by far in the database. Each tuple
is a cell in a character state matrix. When we construct a character
state matrix - to serialize to nexus/nexml/rdf or to display in a
browser - we need to fetch all the elements for a given matrix,
organize them in rows (matrixrow) and columns (matrixcolumn) and look
up their character state symbols (usually discretecharstate).
All of the mentioned tables that matrixelement references - by foreign
keys pointing to their respective primary keys - are also quite large,
so looking all this stuff up takes a long time, as we know,
empirically. It seemed sensible to try to speed this up by adding some
indices:
CREATE INDEX matrixelement_matrixcolumn_id_idx ON
matrixelement(matrixcolumn_id);
CREATE INDEX matrixelement_matrixrow_id_idx ON matrixelement(matrixrow_id);
CREATE INDEX matrixelement_discretecharstate_id_idx ON
matrixelement(discretecharstate_id);
...but some way into this we ran out of disk space. Can we get some more?
Rutger
--
Dr. Rutger A. Vos
School of Biological Sciences
Philip Lyle Building, Level 4
University of Reading
Reading
RG6 6BX
United Kingdom
Tel: +44 (0) 118 378 7535
http://www.nexml.org
http://rutgervos.blogspot.com
|