开发者

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜