简体   繁体   中英

indexing queries in oracle

I wrote this query to find the number of purchases for which there are at least 1000 other purchases, but only if ServiceType, GST and PaymentType are the same.

I was thinking of adding an index to make this query faster, I thought an bitmap index would be the way to go and create this on ServiceType, PaymentType and GST columns.

What is the best index to speed up the query above?

Thanks,

Jim

B-Tree Indexes (default)

BITMAP Indexes : It is used when the number of distinct values is very less also mostly used on tables that are very less updated or not updated at all.

REVERSE Key Indexes : It is used in RAC to prevent the hotspots.

PARTITIONED Indexes (local / global). (local partitioned indexes use the same partitioning scheme that the table is using and global partitioned indexes can have a different indexing scheme than the parent tables)

CLUSTER Indexes : It is created on clustered tables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM