id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 1146,updateindexes.sh should create indexes for foreign keys,Nicklas Nordborg,Nicklas Nordborg,"MySQL automatically generates an index on all foreign key columns, but PostgreSQL doesn't. This has a huge performance impact when the foreign key is in a big table (for example any RawData* table). Without an index, changes (eg. deletions) in the Features table, needs to do a table scan on ALL RawData* tables to make sure that no raw data references the feature. See http://www.mail-archive.com/basedb-devel@lists.sourceforge.net/msg00335.html for more information about this. I think the easiest way to make sure that a PostgreSQL installation is equivalent to a MySQL installation is to let the 'updateindexes.sh' script check if an index exists for a foreign key column. If not, the index should be created.",enhancement,closed,critical,BASE 2.9,install,,fixed,,