Matthew Flaschen wrote:
No, I was just talking about defining the indices (obviously, the query planner is out of luck if you don't define them properly). E.g. in the PostgeSQL tables.sql file:
CREATE INDEX archive_name_title_timestamp ON archive (ar_namespace,ar_title,ar_timestamp);
Even though often this syntax is the same cross-db, since the whole file is db-specific (except MySQL and SQLite share), people have the option of db-specific index variants.
Ah, I see what you mean. Yes, some of that is linked to the capability of the database itself (e.g. can it do a bitmap index scan). So perhaps a suggested index in the abstract schema could be tied to such attributes, and simply not created if the db cannot / should not. Or simply tie it to a specific db type if absolutely needed. I can't recall seeing a case where there would be a *choice* of indexes (e.g. if you can support this index, use it, otherwise, do this one), but that's a SMOP once we encounter that case I suppose. :)
wikitech-l@lists.wikimedia.org