On Oct 7, 2006, at 23:44 , Brandon Aiken wrote:
I download the db source (inside opencrx-1.9.1- core.postgresql-8.zip) and executed their three schema files, dbcreate-indexes.sql, dbcreate-views.sql, dbcreate-tables.sql. Each of the 118 tables has a three-field composite primary key of 'PRIMARY KEY (object_rid, object_oid, object_idx)'. object_rid and object_oid are both VARCHAR(200). There are *no* foreign key constraints. Each table has between 15 and 50 fields, with 25 looking about average.
To be fair, there are a bunch of indexes, but the number of indexes seems low compared to the number of fields.
Gee, why to table joins take so long? Maybe because a blind monkey created the schema? Normalized databases do tend to perform better, so I hear.
*De*normalization is the traditional hack to speed up queries, because it reduces the need for joins.
Alexander.