473,221 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,221 software developers and data experts.

Sub : Query to be tuned which uses a table hint /*+ USE_CONCAT */ in Oracle 10g.

I am firing a query which uses a table hint /*+ USE_CONCAT */ on a table which 250 million data with 13 indexes on it. The problem is query is taking a lot of time to execute i.e. more than 3 minutes.

Query :
Expand|Select|Wrap|Line Numbers
  1. SELECT /*+ USE_CONCAT */ COUNT(*) FROM DI_MATCH_KEY   
  2. WHERE NORM_COUNTRY_CD = 'US'  
  3. AND ((( NORM_CONAME_KEY1 ='WILM I'  OR 
  4. NORM_CONAME_KEY2 = 'WILM I' OR NORM_CONAME_KEY23 = 'WILM I'
  5. OR NORM_CONAME_KEYFIRST ='WILLIAM' )  
  6. AND NORM_STATE_PROVINCE = 'CA' ) OR NORM_ADDR_KEY2 = 'CALMN 12 3 OSAI')
Indexes for columns on this table are :

1.ADDRESS_SOURCE_CD
2.DUNS_NBR
3.AGN_ID(Primary Key)
4.SOURCE_SYSTEM
5.NORM_ADDR_KEY2, NORM_COUNTRY_CD
6.NORM_CITY, NORM_COUNTRY_CD, NORM_STATE_PROVINCE
7.NORM_CONAME_KEY23, NORM_COUNTRY_CD, NORM_STATE_PROVINCE
8.NORM_CONAME_KEY1, 9.NORM_COUNTRY_CD, .NORM_STATE_PROVINCE
10.NORM_COUNTRY_CD, NORM_STATE_PROVINCE
11.NORM_CONAME_KEYFIRST, NORM_COUNTRY_CD, NORM_STATE_PROVINCE
12.NORM_CONAME_KEY2, NORM_COUNTRY_CD, NORM_STATE_PROVINCE
13.NORM_PHONE_NBR, NORM_COUNTRY_CD

Can anyone help me in this regard to know why it is taking time and what is the use of this table hint
Feb 13 '08 #1
3 4558
debasisdas
8,127 Expert 4TB
That time is normal for 250 million records.
Feb 13 '08 #2
I am firing a query which uses a table hint /*+ USE_CONCAT */ on a table which 250 million data with 13 indexes on it. The problem is query is taking a lot of time to execute i.e. more than 3 minutes.

Query :
Expand|Select|Wrap|Line Numbers
  1. SELECT /*+ USE_CONCAT */ COUNT(*) FROM DI_MATCH_KEY   
  2. WHERE NORM_COUNTRY_CD = 'US'  
  3. AND ((( NORM_CONAME_KEY1 ='WILM I'  OR 
  4. NORM_CONAME_KEY2 = 'WILM I' OR NORM_CONAME_KEY23 = 'WILM I'
  5. OR NORM_CONAME_KEYFIRST ='WILLIAM' )  
  6. AND NORM_STATE_PROVINCE = 'CA' ) OR NORM_ADDR_KEY2 = 'CALMN 12 3 OSAI')
Indexes for columns on this table are :

1.ADDRESS_SOURCE_CD
2.DUNS_NBR
3.AGN_ID(Primary Key)
4.SOURCE_SYSTEM
5.NORM_ADDR_KEY2, NORM_COUNTRY_CD
6.NORM_CITY, NORM_COUNTRY_CD, NORM_STATE_PROVINCE
7.NORM_CONAME_KEY23, NORM_COUNTRY_CD, NORM_STATE_PROVINCE
8.NORM_CONAME_KEY1, 9.NORM_COUNTRY_CD, .NORM_STATE_PROVINCE
10.NORM_COUNTRY_CD, NORM_STATE_PROVINCE
11.NORM_CONAME_KEYFIRST, NORM_COUNTRY_CD, NORM_STATE_PROVINCE
12.NORM_CONAME_KEY2, NORM_COUNTRY_CD, NORM_STATE_PROVINCE
13.NORM_PHONE_NBR, NORM_COUNTRY_CD

Can anyone help me in this regard to know why it is taking time and what is the use of this table hint
its normal time. but you can try different indexes including this normal index
index on perticular tablespace, organisation index others it generally used in the datawarehousing concept
Feb 13 '08 #3
amitpatel66
2,367 Expert 2GB
Check out for explanation on USE_CONCAT hint
Feb 13 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Mahesh Hardikar | last post by:
Hi , Oracle 8.1.7.0.0 on HP-UX 11.0 I am a newbie as far as PL-SQL is concerned . I have Sybase/MSSQL T-SQL background. We have a report which uses a select statement . This select...
9
by: hemal | last post by:
I came across a very strange situation at work. There is an order of magnitude difference in execution time for the following two queries (10 v/s ~130 msec): select count(*) from table_name...
3
by: hrishy | last post by:
Hi All I have the following query to be tuned.. Select distinct PA.PersonAddress_IDX, AT.Name AddressType, A.Line1 Address1, A.Line2 Address2, A.City, A.State, A.County, A.Country,...
2
by: Pramod Ramachandran | last post by:
Hi group, I have a query as follows. SELECT * FROM ACS$USG_EVENT, ACS$USG_EVENTDETAIL WHERE ACS$USG_EVENTDETAIL.PARENTCANONICALID = ACS$USG_EVENT.CANONICALID; both the tables are analyzed...
4
by: robboll | last post by:
When I try to use an append query from an oracle link it takes forever. I am exploring the idea of doing an append action using a pass-through query. If I have an Oracle ODBC connection to...
12
by: zwasdl | last post by:
Hi, I'm using MS Access to query against Oracle DB via ODBC. Is it possible to use HINT in Access? Thanks, Wei
5
by: jonceramic | last post by:
Hi All, I started developing in Access, and people took notice and so we're starting to migrate into our corporate's bigger Oracle system. I'll still be using my developed Access front ends,...
11
by: funky | last post by:
hello, I've got a big problem ad i'm not able to resolve it. We have a server running oracle 10g version 10.1.0. We usually use access as front end and connect database tables for data extraction....
0
by: Jim Kennedy | last post by:
If you are firing that many queries you better be using bind variables and parsing the query once and rebinding, and executing many times and NOT closing the cursor. Doing that will help you...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.