|
-
You might want to do a hash partition on the tenant_id table, with a local index on start_zip, end_zip.
You can also make sure that you have an index that filters based on tenant_id first followed by
start_zip and end_zip. This should cause Oracle to do a range scan for the part of the index where
tenant_id = :1 and start_zip <= :2 and end_zip >= :3. The key to tuning a query with equality and
greater than and less than is to make the range scan look at as few rows as possible.
CREATE INDEX LABS_DC_CARRIER_TRANSIT_TIME_007 ON LABS_DC_CARRIER_TRANSIT_TIME ( TENANT_ID, START_ZIP, END_ZIP)
If you have a specific list of tenant_id's, you can also try list partitioning which could create a partition
for each tenant_id, thus querying for a particular would only look at one partition, with only that
tenant_id's data.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|