SQL: Multiple table.column single index
Is there a SQL database that allows having a single index on multiple table.column so I can query for multiple table.column at the same time and have the index return the table.column and the primary开发者_运维百科 key of the table?
Or may I always have to use an external index like Lucene?
Clarification: The index I want is across multiple tables
You can an index to a view which join tables in most RDBMS.
This allows you to have a single index on many columns across many tables
In SQL Server, this is an indexed view. Or materialized view in Oracle.
You can't have a single index applied to columns in multiple tables. With Lucene it is possible to use external indexes as you mentioned.
Check the following link for Lucene:
Using Lucene – External Indexes
Is there a SQL database that allows having a single index on multiple table.column so I can query for multiple table.column at the same time and have the index return the table.column and the primary key of the table?
Not sure I get your question, but it seems you're wondering about the potential for bitmap index scans.
If so, yes. PostgreSQL allows to do that. Best I'm aware, MySQL won't, nor will SQLite. Not sure about Oracle and SQL-Server (though I'd expect yes for both).
精彩评论