473,769 Members | 8,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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_SOURC E_CD
2.DUNS_NBR
3.AGN_ID(Primar y Key)
4.SOURCE_SYSTEM
5.NORM_ADDR_KEY 2, NORM_COUNTRY_CD
6.NORM_CITY, NORM_COUNTRY_CD , NORM_STATE_PROV INCE
7.NORM_CONAME_K EY23, NORM_COUNTRY_CD , NORM_STATE_PROV INCE
8.NORM_CONAME_K EY1, 9.NORM_COUNTRY_ CD, .NORM_STATE_PRO VINCE
10.NORM_COUNTRY _CD, NORM_STATE_PROV INCE
11.NORM_CONAME_ KEYFIRST, NORM_COUNTRY_CD , NORM_STATE_PROV INCE
12.NORM_CONAME_ KEY2, NORM_COUNTRY_CD , NORM_STATE_PROV INCE
13.NORM_PHONE_N BR, 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 4609
debasisdas
8,127 Recognized Expert Expert
That time is normal for 250 million records.
Feb 13 '08 #2
subashsavji
93 New Member
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_SOURC E_CD
2.DUNS_NBR
3.AGN_ID(Primar y Key)
4.SOURCE_SYSTEM
5.NORM_ADDR_KEY 2, NORM_COUNTRY_CD
6.NORM_CITY, NORM_COUNTRY_CD , NORM_STATE_PROV INCE
7.NORM_CONAME_K EY23, NORM_COUNTRY_CD , NORM_STATE_PROV INCE
8.NORM_CONAME_K EY1, 9.NORM_COUNTRY_ CD, .NORM_STATE_PRO VINCE
10.NORM_COUNTRY _CD, NORM_STATE_PROV INCE
11.NORM_CONAME_ KEYFIRST, NORM_COUNTRY_CD , NORM_STATE_PROV INCE
12.NORM_CONAME_ KEY2, NORM_COUNTRY_CD , NORM_STATE_PROV INCE
13.NORM_PHONE_N BR, 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 Recognized Expert Top Contributor
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
4520
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 statement joins 15 tables . SOme of the tables are outer joined. It runs much slow when parameters (From & To Date) are for a month.
9
4750
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 where column_name = 'value' or 1 = 0 select count(*) from table_name where column_name = 'value' I do not want to go into the reason why the redundent condition exists, the example is representative of the real query where it
3
7208
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, A.PostalCode, A.AllowPostalSoftYN, PA.ChangedBy, PA.ChangedDT, PA.DeletedYN ,PA.Person_Key, PA.Address_Key, PA.AddressType_Key FROM PersonAddress_h PA,Address_h A,AddressType_h AT
2
4332
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 and default optimizer is CBO. I use 8i under winnt. The estimate is as follows
4
7078
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 server OraTest. User: User1 Password: password and I am trying to append all records in table: tblTEST that are code: "abc"
12
5285
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
7235
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, but will be migrating my back ends to Oracle ODBC. 1. Does anyone have recommendations for books or web resources for general rules/guidelines/help on doing this? I haven't found a good
11
16330
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. We have been using oracle client 10.1.0.2 with it's odbc for a while without problem. The problem arose when we decided to reconnect all the tables and save password. Some query became suddenly very slow. Then I've discovered that the tables...
0
1447
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 immensely lower CPU usage. You are sending the queries sychronsly and the type of queries you are sending are not suited for doing parallel queries on (" single row from the a table and uses the primary key in its WHERE predicate"). Parallel queries...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.