Tune the SQL Query need a Suggestion
Hi,
There is a view created which takes 17seconds to execute the query, When i split the query and execute each query takes .15 seconds to execute. Below it the query which i need to improve the performance of the code please need your suggestion in order to tweek so that time take for execution become less
SELECT 'Parature' "Source",
NULL "Distibutor",
reseller_name "Reseller",
NULL "Reseller City",
NULL "Reseller State",
A.Country "Reseller Country",
DECODE (a.state, 'APAC', 'APAC', 'EMEA', 'EMEA', NULL, 'Unknown', 'US' ) "Reseller Theater",
NULL "Customer Name",
NULL "Customer City",
NULL "Customer State",
NULL "Customer Country",
NULL "Customer Theater",
NULL "Sales Book Date",
NULL "Ship Date",
c.sales_order_number "Sales Order Number",
C.Po_Number "PO Number",
controller_model_number_1 "Product Name",
TRIM (UPPER (serial_number_1)) "Product Serial Number",
c.contract_id "Contract ID",
product_name "Support Name",
TO_DATE (c.contract_purchase_date) "Start Date",
TO_DATE (c.contract_expiration_date) "Expire Date",
NULL "Header Status",
NULL "Line Status",
NULL "Line Type",
NULL "Termination Reason",
NULL "Location_id",
NULL "Product_id"
FROM edb_assets c,
edb_accounts a
WHERE controller_model_number_1 != 'NULL'
AND Serial_Number_1 != 'NULL'
AND C.Amid = A.Amid(+)
UNION
SELECT 'Parature' "Source",
NULL "Distibutor",
reseller_name "Reseller",
NULL "Reseller City",
NULL "Reseller State",
A.Country "Reseller Country",
DECODE (a.state, 'APAC', 'APAC', 'EMEA', 'EMEA', NULL, 'Unknown', 'US' ) "Reseller Theater",
NULL "Customer Name",
NULL "Customer City",
NULL "Customer State",
NULL "Customer Country",
NULL "Customer Theater",
NULL "Sales Book Date",
NULL "Ship Date",
c.sales_order_number "Sales Order Number",
C.Po_Number "PO Number",
controller_model_number_2 "Product Name",
TRIM (UPPER (serial_number_2)) "Product Serial Number",
c.contract_id "Contract ID",
product_name "Support Name",
TO_DATE (c.contract_purchase_date) "Start Date",
TO_DATE (c.contract_expiration_date) "Expire Date",
NULL "Header Status",
NULL "Line Status",
NULL "Line Type",
NULL "Termination Reason",
NULL "Location_id",
NULL "Product_id"
FROM edb_assets c,
edb_accounts a
WHERE controller_model_number_2 != 'NULL'
AND serial_number_2 != 'NULL'
AND C.Amid = A.Amid(+)
UNION
SELECT 'Parature' "Source",
NULL "Distibutor",
reseller_name "Reseller",
NULL "Reseller City",
NULL "Reseller State",
A.Country "Reseller Country",
DECODE (a.state, 'APAC', 'APAC', 'EMEA', 'EMEA', NULL, 'Unknown', 'US' ) "Reseller Theater",
NULL "Customer Name",
NULL "Customer City",
NULL "Customer State",
NULL "Customer Country",
NULL "Customer Theater",
NULL "Sales Book Date",
NULL "Ship Date",
c.sales_order_number "Sales Order Number",
C.Po_Number "PO Number",
controller_model_number_3 "Product Name",
TRIM (UPPER (serial_number_3)) "Product Serial Number",
c.contract_id "Contract ID",
product_name "Support Name",
TO_DATE (c.contract_purchase_date) "Start Date",
TO_DATE (c.contract_expiration_date) "Expire Date",
NULL "Header Status",
NULL "Line Status",
NULL "Line Type",
NULL "Termination Reason",
NULL "Location_id",
NULL "Product_id"
FROM edb_assets c,
edb_accounts a
WHERE controller_model_number_3 != 'NULL'
AND serial_number_3 != 'NULL'
AND C.Amid = A.Amid(+)
UNION
SELECT 'Parature' "Source",
NULL "Distibutor",
reseller_name "Reseller",
NULL "Reseller City",
NULL "Reseller State",
A.Country "Reseller Country",
DECODE (a.state, 'APAC', 'APAC', 'EMEA', 'EMEA', NULL, 'Unknown', 'US' ) "Reseller Theater",
NULL "Customer Name",
NULL "Customer City",
NULL "Customer State",
NULL "Customer Country",
NULL "Customer Theater",
NULL "Sales Book Date",
NULL "Ship Date",
c.sales_order_number "Sales Order Number",
C.Po_Number "PO Number",
controller_model_number_4 "Product Name",
TRIM (UPPER (serial_number_4)) "Product Serial Number",
c.contract_id "Contract ID",
product_name "Support Name",
TO_DATE (c.contract_purchase_date) "Start Date",
TO_DATE (c.contract_expiration_date) "Expire Date",
NULL "Header Status",
NULL "Line Status",
NULL "Line Type",
NULL "Termination Reason",
NULL "Location_id",
NULL "Product_id"
FROM edb_assets c,
edb_accounts a
WHERE controller_model_number_4 != 'NULL'
AND serial_number_4 != 'NULL'
AND C.Amid = A.Amid(+)
UNION
SELECT 'Parature' "Source",
NULL "Distibutor",
reseller_name "Reseller",
NULL "Reseller City",
NULL "Reseller State",
A.Country "Reseller Country",
DECODE (a.state, 'APAC', 'APAC', 'EMEA', 'EMEA', NULL, 'Unknown', 'US' ) "Reseller Theater",
NULL "Customer Name",
NULL "Customer City",
NULL "Customer State",
NULL "Customer Country",
NULL "Customer Theater",
NULL "Sales Book Date",
NULL "Ship Date",
c.sales_order_number "Sales Order Number",
C.Po_Number "PO Number",
controller_model_number_5 "Product Name",
TRIM (UPPER (serial_number_5)) "Product Serial Number",
c.contract_id "Contract ID",
product_name "Support Name",
TO_DATE (c.contract_purchase_date) "Start Date",
TO_DATE (c.contract_expiration_date) "Expire Date",
NULL "Header Status",
NULL "Line Status",
NULL "Line Type",
NULL "Termination Reason",
NULL "Location_id",
NULL "Product_id"
FROM edb_assets c,
edb_accounts a
WHERE controller_model_number_5 != 'NULL'
AND serial_number_5 != 'NULL'
AND C.Amid = A.Amid(+)
UNION
SELECT 'ERP' "Source",
Imv.Bill_To "Distibutor",
Imv.Ship_To "Reseller",
Ship_To_City "Reseller City",
Ship_To_State "Reseller State",
Edb2_Global.Country_Name_Theater(Imv.Ship_To_Country ,'COUNTRY') "Reseller Country",
Edb2_Global.Country_Name_Theater(Imv.Ship_To_Country ,'THEATER') "Reseller Theater",
Cl.Company_Name "Customer Name",
Cl.City "Customer City",
Cl.State "Customer State",
Edb2_Global.Country_Name_Theater(Cl.Country,'COUNTRY') "Customer Country",
Edb2_Global.Country_Name_Theater(Cl.Country,'THEATER') "Customer Theater",
Imv.So_Booked_Date "Sales Book Date",
Imv.Ship_Date "Ship Date",
Imv.Order_Number "Sales Order Number",
Imv.Cust_Po_Number "PO Number",
Cp.Item_Name "Product Name",
Cp.Product_Serial_Number "Product Serial Number",
TO_CHAR(Imv.contract_number)"Contract ID",
Imv.Service_Description "Support Name",
Imv.Service_Start_Date "Start Date",
Imv.Service_End_Date "Expire Date",
Imv.Header_Status "Header Status",
Imv.Line_Status "Line Status",
Imv.Line_Type "Line Type",
Imv.Termination_Reason "Termination Reason",
Cl.Location_Id "Location_id",
cp.id "Product_id"
FROM ib_support_contracts_mv imv,
customer_products cp,
customer_locations cl
WHERE Upper (Trim (Imv.Serial_Number)) = Upper (Trim (Cp.Product_Serial_Number(+)))
AND Cp.Location_Id = Cl.Location_Id(+)
There is a union for each and every query, Please suggest how to tweek
Thanks
Sudhir
Try
select distinct a.*
from (SELECT 'Parature' "Source",
NULL "Distibutor",
reseller_name "Reseller",
NULL "Reseller City",
NULL "Reseller State",
A.Country "Reseller Country",
DECODE (a.state, 'APAC', 'APAC', 'EMEA', 'EMEA', NULL, 'Unknown', 'US' ) "Reseller Theater",
NULL "Customer Name",
NULL "Customer City",
NULL "Customer State",
NULL "Customer Country",
NULL "Customer Theater",
NULL "Sales Book Date",
NULL "Ship Date",
c.sales_order_number "Sales Order Number",
C.Po_Number "PO Number",
controller_model_number_1 "Product Name",
TRIM (UPPER (serial_number_1)) "Product Serial Number",
c.contract_id "Contract ID",
product_name "Support Name",
TO_DATE (c.contract_purchase_date) "Start Date",
TO_DATE (c.contract_expiration_date) "Expire Date",
NULL "Header Status",
NULL "Line Status",
NULL "Line Type",
NULL "Termination Reason",
NULL "Location_id",
NULL "Product_id"
FROM edb_assets c,
edb_accounts a
WHERE controller_model_number_1 != 'NULL'
AND Serial_Number_1 != 'NULL'
AND C.Amid = A.Amid(+)
union all
SELECT 'Parature' "Source",
NULL "Distibutor",
reseller_name "Reseller",
NULL "Reseller City",
NULL "Reseller State",
A.Country "Reseller Country",
DECODE (a.state, 'APAC', 'APAC', 'EMEA', 'EMEA', NULL, 'Unknown', 'US' ) "Reseller Theater",
NULL "Customer Name",
NULL "Customer City",
NULL "Customer State",
NULL "Customer Country",
NULL "Customer Theater",
NULL "Sales Book Date",
NULL "Ship Date",
c.sales_order_number "Sales Order Number",
C.Po_Number "PO Number",
controller_model_number_2 "Product Name",
TRIM (UPPER (serial_number_2)) "Product Serial Number",
c.contract_id "Contract ID",
product_name "Support Name",
TO_DATE (c.contract_purchase_date) "Start Date",
TO_DATE (c.contract_expiration_date) "Expire Date",
NULL "Header Status",
NULL "Line Status",
NULL "Line Type",
NULL "Termination Reason",
NULL "Location_id",
NULL "Product_id"
FROM edb_assets c,
edb_accounts a
WHERE controller_model_number_2 != 'NULL'
AND serial_number_2 != 'NULL'
AND C.Amid = A.Amid(+)
union all
SELECT 'Parature' "Source",
NULL "Distibutor",
reseller_name "Reseller",
NULL "Reseller City",
NULL "Reseller State",
A.Country "Reseller Country",
DECODE (a.state, 'APAC', 'APAC', 'EMEA', 'EMEA', NULL, 'Unknown', 'US' ) "Reseller Theater",
NULL "Customer Name",
NULL "Customer City",
NULL "Customer State",
NULL "Customer Country",
NULL "Customer Theater",
NULL "Sales Book Date",
NULL "Ship Date",
c.sales_order_number "Sales Order Number",
C.Po_Number "PO Number",
controller_model_number_3 "Product Name",
TRIM (UPPER (serial_number_3)) "Product Serial Number",
c.contract_id "Contract ID",
product_name "Support Name",
TO_DATE (c.contract_purchase_date) "Start Date",
TO_DATE (c.contract_expiration_date) "Expire Date",
NULL "Header Status",
NULL "Line Status",
NULL "Line Type",
NULL "Termination Reason",
NULL "Location_id",
NULL "Product_id"
FROM edb_assets c,
edb_accounts a
WHERE controller_model_number_3 != 'NULL'
AND serial_number_3 != 'NULL'
AND C.Amid = A.Amid(+)
union all
SELECT 'Parature' "Source",
NULL "Distibutor",
reseller_name "Reseller",
NULL "Reseller City",
NULL "Reseller State",
A.Country "Reseller Country",
DECODE (a.state, 'APAC', 'APAC', 'EMEA', 'EMEA', NULL, 'Unknown', 'US' ) "Reseller Theater",
NULL "Customer Name",
NULL "Customer City",
NULL "Customer State",
NULL "Customer Country",
NULL "Customer Theater",
NULL "Sales Book Date",
NULL "Ship Date",
c.sales_order_number "Sales Order Number",
C.Po_Number "PO Number",
controller_model_number_4 "Product Name",
TRIM (UPPER (serial_number_4)) "Product Serial Number",
c.contract_id "Contract ID",
product_name "Support Name",
TO_DATE (c.contract_purchase_date) "Start Date",
TO_DATE (c.contract_expiration_date) "Expire Date",
NULL "Header Status",
NULL "Line Status",
NULL "Line Type",
NULL "Termination Reason",
NULL "Location_id",
NULL "Product_id"
FROM edb_assets c,
edb_accounts a
WHERE controller_model_number_4 != 'NULL'
AND serial_number_4 != 'NULL'
AND C.Amid = A.Amid(+)
union all
SELECT 'Parature' "Source",
NULL "Distibutor",
reseller_name "Reseller",
NULL "Reseller City",
NULL "Reseller State",
A.Country "Reseller Country",
DECODE (a.state, 'APAC', 'APAC', 'EMEA', 'EMEA', NULL, 'Unknown', 'US' ) "Reseller Theater",
NULL "Customer Name",
NULL "Customer City",
NULL "Customer State",
NULL "Customer Country",
NULL "Customer Theater",
NULL "Sales Book Date",
NULL "Ship Date",
c.sales_order_number "Sales Order Number",
C.Po_Number "PO Number",
controller_model_number_5 "Product Name",
TRIM (UPPER (serial_number_5)) "Product Serial Number",
c.contract_id "Contract ID",
product_name "Support Name",
TO_DATE (c.contract_purchase_date) "Start Date",
TO_DATE (c.contract_expiration_date) "Expire Date",
NULL "Header Status",
NULL "Line Status",
NULL "Line Type",
NULL "Termination Reason",
NULL "Location_id",
NULL "Product_id"
FROM edb_assets c,
edb_accounts a
WHERE controller_model_number_5 != 'NULL'
AND serial_number_5 != 'NULL'
AND C.Amid = A.Amid(+)
union all
SELECT 'ERP' "Source",
Imv.Bill_To "Distibutor",
Imv.Ship_To "Reseller",
Ship_To_City "Reseller City",
Ship_To_State "Reseller State",
Edb2_Global.Country_Name_Theater(Imv.Ship_To_Country ,'COUNTRY') "Reseller Country",
Edb2_Global.Country_Name_Theater(Imv.Ship_To_Country ,'THEATER') "Reseller Theater",
Cl.Company_Name "Customer Name",
Cl.City "Customer City",
Cl.State "Customer State",
Edb2_Global.Country_Name_Theater(Cl.Country,'COUNTRY') "Customer Country",
Edb2_Global.Country_Name_Theater(Cl.Country,'THEATER') "Customer Theater",
Imv.So_Booked_Date "Sales Book Date",
Imv.Ship_Date "Ship Date",
Imv.Order_Number "Sales Order Number",
Imv.Cust_Po_Number "PO Number",
Cp.Item_Name "Product Name",
Cp.Product_Serial_Number "Product Serial Number",
TO_CHAR(Imv.contract_number)"Contract ID",
Imv.Service_Description "Support Name",
Imv.Service_Start_Date "Start Date",
Imv.Service_End_Date "Expire Date",
Imv.Header_Status "Header Status",
Imv.Line_Status "Line Status",
Imv.Line_Type "Line Type",
Imv.Termination_Reason "Termination Reason",
Cl.Location_Id "Location_id",
cp.id "Product_id"
FROM ib_support_contracts_mv imv,
customer_products cp,
customer_locations cl
WHERE Upper (Trim (Imv.Serial_Number)) = Upper (Trim (Cp.Product_Serial_Number(+)))
AND Cp.Location_Id = Cl.Location_Id(+)) a
Edited by: HuaMin on May 9, 2012 2:58 PM
Similar Messages
-
Hi,
PLease help me to tune the query
select primary_rep,
rep_ssn,
nvl(product_type_desc, 'UNKNOWN') as productName,
ROUND(sum(contributions)) as contribution,
ROUND(sum(withdrawls)) as withdrawls,
ROUND(sum(netflow)) as netflow
from dev.NETFLOW_VIEW_TSS_P
where bd = 'TSS'
and actvtydate between '01-Jan-2011' and '30-Sep-2011'
and rep_ssn IN (select tax_id from broker_view where broker_id = '600468')
group by primary_rep, rep_ssn, nvl(product_type_desc, 'UNKNOWN');
explain plan details below
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 79 | 158K| | 74348 (1)| 00:14:53 | | |
| 1 | HASH GROUP BY | | 79 | 158K| | 74348 (1)| 00:14:53 | | |
|* 2 | HASH JOIN | | 79 | 158K| | 74347 (1)| 00:14:53 | | |
| 3 | VIEW | VW_NSO_1 | 1 | 6 | | 18 (17)| 00:00:01 | | |
| 4 | HASH UNIQUE | | 1 | 100 | | 18 (17)| 00:00:01 | | |
| 5 | NESTED LOOPS OUTER | | 1 | 100 | | 17 (12)| 00:00:01 | | |
| 6 | MERGE JOIN CARTESIAN | | 1 | 92 | | 17 (12)| 00:00:01 | | |
| 7 | NESTED LOOPS OUTER | | 1 | 71 | | 15 (14)| 00:00:01 | | |
| 8 | NESTED LOOPS OUTER | | 1 | 67 | | 12 (17)| 00:00:01 | | |
|* 9 | HASH JOIN OUTER | | 1 | 63 | | 10 (20)| 00:00:01 | | |
| 10 | NESTED LOOPS OUTER | | 1 | 56 | | 6 (0)| 00:00:01 | | |
| 11 | NESTED LOOPS OUTER | | 1 | 52 | | 4 (0)| 00:00:01 | | |
| 12 | TABLE ACCESS BY INDEX ROWID | AFFILIATE | 1 | 45 | | 2 (0)| 00:00:01 | | |
|* 13 | INDEX UNIQUE SCAN | AFFILIATE_PK | 1 | | | 1 (0)| 00:00:01 | | |
|* 14 | TABLE ACCESS FULL | PORTAL_BROKER | 1 | 7 | | 2 (0)| 00:00:01 | | |
| 15 | VIEW PUSHED PREDICATE | | 1 | 4 | | 2 (0)| 00:00:01 | | |
| 16 | NESTED LOOPS | | 1 | 28 | | 2 (0)| 00:00:01 | | |
| 17 | NESTED LOOPS | | 1 | 21 | | 2 (0)| 00:00:01 | | |
|* 18 | TABLE ACCESS BY INDEX ROWID | LOCATION_GROUP_TYPE_DESC | 1 | 5 | | 1 (0)| 00:00:01 | | |
|* 19 | INDEX UNIQUE SCAN | LOCATION_GROUP_TYPE_DESC_PK | 1 | | | 0 (0)| 00:00:01 | | |
|* 20 | INDEX RANGE SCAN | LOCATION_GROUP_UK | 1 | 16 | | 1 (0)| 00:00:01 | | |
|* 21 | INDEX UNIQUE SCAN | CONTACT_METHOD_PK | 1 | 7 | | 0 (0)| 00:00:01 | | |
| 22 | VIEW | | 1 | 7 | | 3 (34)| 00:00:01 | | |
| 23 | HASH UNIQUE | | 1 | 11 | | 3 (34)| 00:00:01 | | |
|* 24 | INDEX RANGE SCAN | AFFILIATE_TYPE_PK | 1 | 11 | | 2 (0)| 00:00:01 | | |
| 25 | VIEW PUSHED PREDICATE | | 1 | 4 | | 2 (0)| 00:00:01 | | |
| 26 | NESTED LOOPS | | 1 | 28 | | 2 (0)| 00:00:01 | | |
| 27 | NESTED LOOPS | | 1 | 21 | | 2 (0)| 00:00:01 | | |
|* 28 | TABLE ACCESS BY INDEX ROWID | LOCATION_GROUP_TYPE_DESC | 1 | 5 | | 1 (0)| 00:00:01 | | |
|* 29 | INDEX UNIQUE SCAN | LOCATION_GROUP_TYPE_DESC_PK | 1 | | | 0 (0)| 00:00:01 | | |
|* 30 | INDEX RANGE SCAN | LOCATION_GROUP_UK | 1 | 16 | | 1 (0)| 00:00:01 | | |
|* 31 | INDEX UNIQUE SCAN | CONTACT_METHOD_PK | 1 | 7 | | 0 (0)| 00:00:01 | | |
| 32 | VIEW PUSHED PREDICATE | | 1 | 4 | | 3 (0)| 00:00:01 | | |
| 33 | NESTED LOOPS OUTER | | 1 | 35 | | 3 (0)| 00:00:01 | | |
| 34 | NESTED LOOPS | | 1 | 32 | | 3 (0)| 00:00:01 | | |
| 35 | NESTED LOOPS | | 1 | 22 | | 2 (0)| 00:00:01 | | |
|* 36 | TABLE ACCESS BY INDEX ROWID | LOCATION_GROUP_TYPE_DESC | 1 | 5 | | 1 (0)| 00:00:01 | | |
|* 37 | INDEX UNIQUE SCAN | LOCATION_GROUP_TYPE_DESC_PK | 1 | | | 0 (0)| 00:00:01 | | |
|* 38 | INDEX RANGE SCAN | LOCATION_GROUP_UK | 1 | 17 | | 1 (0)| 00:00:01 | | |
| 39 | TABLE ACCESS BY INDEX ROWID | ADDRESS | 1 | 10 | | 1 (0)| 00:00:01 | | |
|* 40 | INDEX UNIQUE SCAN | ADDRESS_PK | 1 | | | 0 (0)| 00:00:01 | | |
|* 41 | INDEX UNIQUE SCAN | PROV_STDSC_PK | 1 | 3 | | 0 (0)| 00:00:01 | | |
| 42 | BUFFER SORT | | 1 | 21 | | 14 (15)| 00:00:01 | | |
|* 43 | INDEX RANGE SCAN | I_BROKER_BKBRCMB | 1 | 21 | | 2 (0)| 00:00:01 | | |
|* 44 | INDEX UNIQUE SCAN | BROKER_BRANCH_PK | 1 | 8 | | 0 (0)| 00:00:01 | | |
| 45 | VIEW | NETFLOW_VIEW_TSS_P | 391K| 766M| | 74325 (1)| 00:14:52 | | |
| 46 | UNION-ALL | | | | | | | | |
|* 47 | HASH JOIN RIGHT OUTER | | 11645 | 1671K| | 49023 (1)| 00:09:49 | | |
| 48 | VIEW | | 1 | 38 | | 13602 (1)| 00:02:44 | | |
|* 49 | FILTER | | | | | | | | |
| 50 | TABLE ACCESS FULL | SALES_REPORT_REP_MAPPING | 9023 | 326K| | 58 (2)| 00:00:01 | | |
|* 51 | FILTER | | | | | | | | |
| 52 | SORT GROUP BY NOSORT | | 1 | 11 | | 3 (0)| 00:00:01 | | |
| 53 | TABLE ACCESS BY INDEX ROWID | SALES_REPORT_REP_MAPPING | 1 | 11 | | 3 (0)| 00:00:01 | | |
|* 54 | INDEX RANGE SCAN | I_SAL_REP_MAP_REPID | 1 | | | 2 (0)| 00:00:01 | | |
| 55 | NESTED LOOPS | | 11645 | 1239K| | 35420 (1)| 00:07:06 | | |
|* 56 | HASH JOIN RIGHT OUTER | | 11645 | 898K| | 12112 (1)| 00:02:26 | | |
| 57 | INDEX FAST FULL SCAN | I_VENDORS_ACCTLOC | 986 | 3944 | | 2 (0)| 00:00:01 | | |
|* 58 | HASH JOIN RIGHT OUTER | | 11645 | 852K| | 12109 (1)| 00:02:26 | | |
|* 59 | MAT_VIEW ACCESS FULL | SECS_DESC | 26777 | 418K| | 3082 (1)| 00:00:37 | | |
|* 60 | FILTER | | | | | | | | |
|* 61 | HASH JOIN RIGHT OUTER | | 11645 | 670K| | 9026 (1)| 00:01:49 | | |
| 62 | MAT_VIEW ACCESS FULL | ENTRYCODES | 1640 | 11480 | | 8 (0)| 00:00:01 | | |
|* 63 | HASH JOIN | | 34936 | 1774K| | 9017 (1)| 00:01:49 | | |
|* 64 | INDEX FULL SCAN | I_CODE | 30 | 420 | | 1 (0)| 00:00:01 | | |
| 65 | PARTITION RANGE ALL | | 342K| 12M| | 9013 (1)| 00:01:49 | 1 | 20 |
| 66 | TABLE ACCESS BY LOCAL INDEX ROWID| BKPG | 342K| 12M| | 9013 (1)| 00:01:49 | 1 | 20 |
|* 67 | INDEX RANGE SCAN | I_BKPG_ACT_REC_IDX | 342K| | | 1412 (1)| 00:00:17 | 1 | 20 |
| 68 | TABLE ACCESS BY INDEX ROWID | ACCT_CUBE | 1 | 30 | | 2 (0)| 00:00:01 | | |
|* 69 | INDEX UNIQUE SCAN | ACCT_CUBE_PK | 1 | | | 1 (0)| 00:00:01 | | |
|* 70 | HASH JOIN RIGHT OUTER | | 379K| 52M| | 25303 (1)| 00:05:04 | | |
| 71 | VIEW | | 1 | 38 | | 13602 (1)| 00:02:44 | | |
|* 72 | FILTER | | | | | | | | |
| 73 | TABLE ACCESS FULL | SALES_REPORT_REP_MAPPING | 9023 | 326K| | 58 (2)| 00:00:01 | | |
|* 74 | FILTER | | | | | | | | |
| 75 | SORT GROUP BY NOSORT | | 1 | 11 | | 3 (0)| 00:00:01 | | |
| 76 | TABLE ACCESS BY INDEX ROWID | SALES_REPORT_REP_MAPPING | 1 | 11 | | 3 (0)| 00:00:01 | | |
|* 77 | INDEX RANGE SCAN | I_SAL_REP_MAP_REPID | 1 | | | 2 (0)| 00:00:01 | | |
|* 78 | HASH JOIN | | 379K| 39M| 33M| 11696 (2)| 00:02:21 | | |
|* 79 | HASH JOIN | | 379K| 28M| | 3210 (2)| 00:00:39 | | |
|* 80 | INDEX FAST FULL SCAN | I_VENDORS_ACCTLOC | 986 | 3944 | | 2 (0)| 00:00:01 | | |
|* 81 | HASH JOIN | | 379K| 27M| 14M| 3204 (2)| 00:00:39 | | |
| 82 | INDEX FAST FULL SCAN | SECS_DESC_PK | 744K| 6545K| | 457 (3)| 00:00:06 | | |
|* 83 | FILTER | | | | | | | | |
|* 84 | HASH JOIN RIGHT OUTER | | 379K| 24M| | 569 (3)| 00:00:07 | | |
| 85 | MAT_VIEW ACCESS FULL | MFENTRYCODES | 6853 | 61677 | | 15 (0)| 00:00:01 | | |
| 86 | PARTITION RANGE ALL | | 1138K| 62M| | 542 (1)| 00:00:07 | 1 | 15 |
|* 87 | TABLE ACCESS BY LOCAL INDEX ROWID | MFBKPG | 1138K| 62M| | 542 (1)| 00:00:07 | 1 | 15 |
|* 88 | INDEX RANGE SCAN | I_MFBKPGP_ACTDT_ACCT_TST | 904 | | | 107 (0)| 00:00:02 | 1 | 15 |
| 89 | INDEX FAST FULL SCAN | I_ACCT_CUBE_REPID_MKT | 1952K| 52M| | 3096 (2)| 00:00:38 | | |
Predicate Information (identified by operation id):
2 - access("REP_SSN"="$nso_col_1")
9 - access("A"."AFFILIATE_ID"="MGR"."AFFILIATE_ID"(+))
13 - access("A"."AFFILIATE_ID"='600468')
14 - filter("PORTAL_BROKER"."BROKER_ID"(+)='600468')
18 - filter("LT"."ADDRESS_CONTACT_IND"='C')
19 - access("LT"."LOCATION_GROUP_TYPE_CODE"='WF')
20 - access("L"."LOCATION_GROUP_TYPE_CODE"='WF' AND "L"."AFFILIATE_ID"="A"."AFFILIATE_ID")
filter("L"."CONTACT_METHOD_ID" IS NOT NULL)
21 - access("L"."CONTACT_METHOD_ID"="B"."CONTACT_METHOD_ID")
24 - access("AFFILIATE_ID"='600468')
filter("AFFILIATE_TYPE"='BBE' OR "AFFILIATE_TYPE"='BRM' OR "AFFILIATE_TYPE"='ISP')
28 - filter("LT"."ADDRESS_CONTACT_IND"='C')
29 - access("LT"."LOCATION_GROUP_TYPE_CODE"='WT')
30 - access("L"."LOCATION_GROUP_TYPE_CODE"='WT' AND "L"."AFFILIATE_ID"="A"."AFFILIATE_ID")
filter("L"."CONTACT_METHOD_ID" IS NOT NULL)
31 - access("L"."CONTACT_METHOD_ID"="B"."CONTACT_METHOD_ID")
36 - filter("LT"."ADDRESS_CONTACT_IND"='A')
37 - access("LT"."LOCATION_GROUP_TYPE_CODE"='WM')
38 - access("L"."LOCATION_GROUP_TYPE_CODE"='WM' AND "L"."AFFILIATE_ID"="A"."AFFILIATE_ID")
filter("L"."ADDRESS_ID" IS NOT NULL)
40 - access("L"."ADDRESS_ID"="A"."ADDRESS_ID")
41 - access("A"."PROVINCE_STATE_CODE"="S"."PROVINCE_STATE_CODE"(+))
43 - access("B"."BROKER_ID"='600468')
44 - access("B"."BRANCH_ID"="BR"."BRANCH_ID"(+))
47 - access("B"."REPID"="K"."REPID"(+))
49 - filter( EXISTS (SELECT 0 FROM DEV."SALES_REPORT_REP_MAPPING" "SALES_REPORT_REP_MAPPING" WHERE "REPID"=:B1 GROUP BY "REPID" HAVING
SUM(NVL("PCT",100))=100))
51 - filter(SUM(NVL("PCT",100))=100)
54 - access("REPID"=:B1)
56 - access(NVL("V"."VENDOR_CD"(+),'xxx')=NVL("VENDOR_CD",'yyy'))
58 - access("CUSIP"(+)="A"."CUSIP")
59 - filter("COMM_SECTYPE"(+)='MF')
60 - filter(NVL("Z"."PERF_INCLUDE_PORTFOLIO",'xx')='Y')
61 - access("A"."ENTRYCODE"="Z"."ENTRYCODE"(+))
63 - access("CODE_IN"=SUBSTR("A"."ACCT",1,3))
64 - access("CODE_TYPE"='NETFLOW')
filter("CODE_TYPE"='NETFLOW')
67 - access("A"."ACTVTYDATE">=TO_DATE(' 2011-01-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "A"."ACTVTYDATE"<=TO_DATE(' 2011-09-30
00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
69 - access("B"."ACCOUNTKEY"='11,,,'||"A"."ACCT")
70 - access("A"."REPID"="K"."REPID"(+))
72 - filter( EXISTS (SELECT 0 FROM DEV."SALES_REPORT_REP_MAPPING" "SALES_REPORT_REP_MAPPING" WHERE "REPID"=:B1 GROUP BY "REPID" HAVING
SUM(NVL("PCT",100))=100))
74 - filter(SUM(NVL("PCT",100))=100)
77 - access("REPID"=:B1)
78 - access("A"."ACCOUNTKEY"='20,'||"B"."VENDOR_CD"||','||"B"."FUNDNO"||','||"B"."ACCT")
79 - access("V"."VENDOR_CD"="B"."VENDOR_CD")
80 - filter("V"."VENDOR_CD"<>'HNR' AND "V"."VENDOR_CD"<>'CNL' AND "V"."VENDOR_CD"<>'IRE' AND "V"."VENDOR_CD"<>'WLR' AND
"V"."VENDOR_CD"<>'WLP' AND "V"."VENDOR_CD"<>'PER' AND "V"."VENDOR_CD"<>'BHV')
81 - access("SD"."CUSIP"="B"."CUSIP")
83 - filter(NVL("E"."PERF_INCLUDE_PORTFOLIO",'xx')='Y')
84 - access("B"."ENTRYCODE"="E"."ENTRYCODE"(+))
87 - filter("B"."VENDOR_CD"<>'HNR' AND "B"."VENDOR_CD"<>'CNL' AND "B"."VENDOR_CD"<>'IRE' AND "B"."VENDOR_CD"<>'WLR' AND
"B"."VENDOR_CD"<>'WLP' AND "B"."VENDOR_CD"<>'PER' AND "B"."VENDOR_CD"<>'BHV')
88 - access(SYS_OP_DESCEND("ACTVTYDATE")>=HEXTORAW('8790F6E1FEF8FEFAFF') AND SYS_OP_DESCEND("ACTVTYDATE")<=HEXTORAW('8790FEF8FEF8FEFAFF')
filter(SYS_OP_UNDESCEND(SYS_OP_DESCEND("ACTVTYDATE"))>=TO_DATE(' 2011-01-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
SYS_OP_UNDESCEND(SYS_OP_DESCEND("ACTVTYDATE"))<=TO_DATE(' 2011-09-30 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
158 rows selected.ThanksSo this is a VIEW with I think 18 tables (I may have missed one or two), some of which are referenced more than one. Some of these tables have tens of miilions of rows. What exactly are you expecting from us?
I guess this is a data warehouse or BI query. Sometimes such queries just take an age to run and there's nothing which can be done except result caching. Other times the queries can be tuned, but iit requires way more context and domain knowledge than you have provided.
Please start by reading [url https://forums.oracle.com/forums/thread.jspa?threadID=2174552#9360003]this FAQ. .
Cheers, APC -
Request for tunning the SQL query
Hi,
I've a query mentioned below.I've tried it in different ways.But still it is taking much time.
And there are some 9 indexes created on the column siteid. And both the table having indexes.But still full table scanning occuring for both the tables. Can any one help on this.Or can anyone write the same query in a different way.
select r.recordkey,
r.orgid,
r.siteid,
r.class,
w.pscdate,
w.ascdate,
w.targstartdate,
w.targcompdate,
w.schedfinish,
w.actfinish,
w.estdur,
w.wonum,
w.mprn,
w.sihousename wositehousename,
w.sihouseno wositehouseno,
w.sistreet wositestreet,
w.sicounty wositecounty,
w.siposttown wositeposttown,
w.sipostcode wositepostcode,
w.workorderid
from relatedrecord r,
workorder w
where r.relatedreckey = case when w.parent is null then w.wonum else w.parent end
and r.orgid = w.orgid
and r.siteid = w.siteid
and r.relatedrecclass = 'WORKORDER'
Explain Plan Res:
Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
SELECT STATEMENT Optimizer Mode=ALL_ROWS 38 K 4819
HASH JOIN 38 K 5 M 4819
TABLE ACCESS FULL MAXIMO.RELATEDRECORD 30 K 1 M 390
TABLE ACCESS FULL MAXIMO.WORKORDER 229 K 26 M 2922
Regards,
Arjun.Hi,
Some question.
1) r.relatedrecclass = 'WORKORDER', how many records are there with relatedrecclass as "WORKORDER" compared to the total number of records in that table (in percentage)
2) Do we have index on relatedrecclass? (if possible in combination with recordkey and class column)
3) What is the total number of records in both the table?
4) What is the expected number of records with the below query?
Regards
Anurag -
Hi,
TKPROF: Release 8.1.7.0.0 - Production on Wed Sep 23 23:04:43 2009
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Trace file: pindb_ora_9943.trc
Sort options: prsela exeela fchela fchela
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
SELECT f.poid_id0, COUNT (*), SUM (amount), d.subscription_amt, d.free_mb
FROM event_t a,
event_bal_impacts_t b,
(SELECT DISTINCT a.obj_id0 AS account_obj_id0, a.node_location,
a.plan_obj_id0
FROM account_products_t a
WHERE plan_obj_id0 > 0 AND service_obj_id0 > 0
UNION
SELECT DISTINCT a.account_obj_id0, a.node_location, a.plan_obj_id0
FROM audit_account_products_t a
WHERE plan_obj_id0 > 0
AND service_obj_id0 > 0
AND effective_end_t > 0) c,
iq_prov_tags_t d,
event_session_dialup_t e,
plan_t f
WHERE a.poid_id0 = b.obj_id0
AND a.poid_id0 = e.obj_id0
AND b.node_location = c.node_location
AND a.account_obj_id0 = c.account_obj_id0
AND c.plan_obj_id0 = d.plan_poid_id0
AND d.plan_poid_id0 = f.poid_id0
AND a.end_t >= pin_date_to_seconds (TRUNC ( SYSDATE
- 1), NULL)
AND a.end_t < pin_date_to_seconds (TRUNC (SYSDATE), NULL)
AND b.resource_id IN (1000051)
GROUP BY f.poid_id0, d.subscription_amt, d.free_mb
call count cpu elapsed disk query current rows
Parse 1 0.09 0.08 0 0 0 0
Execute 2 0.07 0.07 0 0 0 0
Fetch 2 235.91 2295.25 1509704 1674184 346 11
total 5 236.07 2295.40 1509704 1674184 346 11
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 28
Rows Row Source Operation
11 SORT GROUP BY
69 NESTED LOOPS
70 NESTED LOOPS
70 NESTED LOOPS
70 HASH JOIN
70 HASH JOIN
300499 TABLE ACCESS BY INDEX ROWID EVENT_T
300500 INDEX RANGE SCAN (object id 26458)
816394 TABLE ACCESS BY INDEX ROWID EVENT_BAL_IMPACTS_T
816395 INDEX RANGE SCAN (object id 26463)
2385556 VIEW
2385556 SORT UNIQUE
3124105 UNION-ALL
638617 TABLE ACCESS FULL ACCOUNT_PRODUCTS_T
2485488 TABLE ACCESS FULL AUDIT_ACCOUNT_PRODUCTS_T
138 TABLE ACCESS BY INDEX ROWID IQ_PROV_TAGS_T
138 INDEX UNIQUE SCAN (object id 26554)
138 INDEX UNIQUE SCAN (object id 23148)
69 INDEX UNIQUE SCAN (object id 27372)
ALTER SESSION SET SQL_TRACE = TRUE
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 1 0.00 0.00 0 0 0 0
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer goal: CHOOSE
Parsing user id: 28
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.09 0.08 0 0 0 0
Execute 3 0.07 0.07 0 0 0 0
Fetch 2 235.91 2295.25 1509704 1674184 346 11
total 6 236.07 2295.40 1509704 1674184 346 11
Misses in library cache during parse: 1
Misses in library cache during execute: 1
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 2 0.01 0.00 0 0 0 0
Execute 2 0.00 0.00 0 0 0 0
Fetch 20 0.00 0.01 0 40 0 18
total 24 0.01 0.01 0 40 0 18
Misses in library cache during parse: 1
2 user SQL statements in session.
2 internal SQL statements in session.
4 SQL statements in session.
Trace file: pindb_ora_9943.trc
Trace file compatibility: 8.00.04
Sort options: prsela exeela fchela fchela
1 session in tracefile.
2 user SQL statements in trace file.
2 internal SQL statements in trace file.
4 SQL statements in trace file.
3 unique SQL statements in trace file.
118 lines in trace file.Inputs are appreciated
Prakash GRsorry hash joint for asking this type of question but i do not have any option since i am not query tuner i need inputs so that i can put some effort on this
Would you like a cup of tea with this my dear ?chilled beer will be offered if any inputs given
Thanks
Prakash GR -
SQL QUERY : Need More suggestions
Hai guys
Main Table : order (id,name)
child table: sub_order(oid,ticket,sec)
order id is joined with ticket of suborder.
select id,
name,
oid,
ticket,
sec
from order,sub_order
where id=ticket
I want i more columns in my query that is if particular order has more tickets then it should have '4444444' as column (id_grp) in select query.
(ie) select id,
name,
oid,
ticket,
sec,
id_grp
from order,sub_order
where id=ticket
id_grp should contain '444444' if particular orderid has more tickets .
ANY easy method pls ans
SOr maybe
SELECT ID, NAME, OID, ticket, sec,
CASE WHEN COUNT (*) OVER (PARTITION BY ticket) > 1
THEN 444444
END id_grp
FROM ORDER, sub_order
WHERE ID = ticket*untested -
In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .
Hi Srinath,
The below blog might be useful
http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
regards,
Harish -
Sql Query need to extract the Work Flow information from Hyperion Planning
Can Any one give me the sql query to extract the Work flow from Hyperion Planning in 11.1.2.1.
I can extract from the Hyperion Planning but it is not in required format again I need to do lot of formating. I need the information as per the flow structure is showing linke in one perticular planning unit in all coloumn format. Hence only sql query will help me to extract this kind of information. could any one provide the sql query to extract this kind of request.
Thanks in Advance.
Edited by: 987185 on Feb 9, 2013 10:57 PMIf you have a look at the data models in - http://www.oracle.com/technetwork/middleware/bi-foundation/epm-data-models-11121-354684.zip
There is the structure of the planning application tables, have a look at the HSP_PM_* tables
Alternatively you can look at extracting the information using LCM.
Cheers
John
http://john-goodwin.blogspot.com/ -
How to get cm:search to use the max attribute when creating the SQL query?
When we use the max attribute in the cm:search tag, it does not seem to honor the max attribute when creating the SQL query. However, the result returned from the tag is limited to the number specified by the max attribute. Then the tag seems to work as intended, but the performance will be sub optimal when the SQL query returns unnecessary rows to the application.
We use the cm:search tag to list the latest news (ordered by date), and with the current implementation we have to expect a decrease in performance over time as more news is published. But we can’t live with that. We need to do the constraint in the SQL query, not in the application.
The sortBy attribute of cm:search is translated to “order by” in the SQL query, as expected.
Is it possible to get cm:search to generate the SQL query with an addition of “where rownum <= maxRows”?Hi Erik,
The behavior of a repository in regards to the search tag's max results parameter is dependent on the underlying repository's implementation. That said, the OOTB repository in WLP does augment the generated SQL to limit the number of rows returned from the database. This is done in the parsing logic. This behavior may differ with other repository implementations.
-Ryan -
The SQL query is not executing
Hi
I have the following situation: In a project we designed our reports calling a stored procedure the exits in a MS SQL Server 200 database. The Stored Procedures works fine and when they are used in the report everything works perfectly.
The reports are being made with CR DEsigner 11, when the designer ends them, ha pass them to me and we put them in our java web application. I open them and even preview them since the Crystal Reprots Perspective of Eclipse and I can see the data, so everything to this point is OK.
The problem comes when I change of connection, I'm trying to connect every report to the same host and database, and when the reprot is displayed in the browser there is no data. I profile the SQL commands that are executed when the report is requested and I found that the reprot is not executing the stored procedure.
I guess because i'm connectring the report to the same database and host that was used when the report is created and i'm also passing exactly the same parameters of the stored procedure, then report thinks that it doesn't have executing again becuase it will be the same information.
SO, i wonder if there is a way to request to the report to execute the sql query every time i have to display it.
thanks for any help.What happens when you try to view the report using a simple viewer.jsp?without changing the connection?
2009-05-25 14:06:09,250 ERROR com.businessobjects.reports.sdk.JRCCommunicationAdapter - detected an exception: Error de conexión: [SQLServer 2000 Driver for JDBC]Error establishing socket.
But the database server is ok, so i think the rpt needs more information to be connect to the database.
Also what happens if you dont use the data bean and give everything there only?
The same, the rpt is not executing the stored procedure.
Did anything change on the RDBMS side? Additional packages, changes to the schema, ownership, etc?
No, the server is ok and the database is ok.
If you configure Log4J logging to DEBUG, you should see the database invokes from the Crystal Java engine, specifically the queries sent and the number of rowsets returned. Do you notice any errors?
I have a problem here with log4j. In my project i'm using spring and with the help of spring i configure log4j, basically with spring is easier to configure log4j.
I'm telling you this because i have log4j working but when my application reaches the code to change the connection to the rerport, log4j dies and stop sending any message to the stdout or to a log file. I haven't since this behavior in any other app o library. So i want to guess i have something wrong with my log4j or maybe with log4j+spring.
So, i remove all the code of spring referring to log4j, but the problem with log4j wasn't solved.
What i will try now is to remove spring from the project.
This is my log4j.properties:
log4j.rootLogger=DEBUG, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n -
Give me the sql query which calculte the table size in oracle 10g ecc 6.0
Hi expert,
Please give me the sql query which calculte the table size in oracle 10g ecc 6.0.
RegardsOrkun Gedik wrote:
select segment_name, sum(bytes)/(1024*1024) from dba_segments where segment_name = '<TABLE_NAME>' group by segment_name;
Hi,
This delivers possibly wrong data in MCOD installations.
Depending on Oracle Version and Patchlevel dba_segments does not always have the correct data,
at any time esp. for indexes right after being rebuild parallel (Even in DB02 because it is using USER_SEGMENTS).
Takes a day to get the data back in line (never found out, who did the correction at night, could be RSCOLL00 ?).
Use above statement with "OWNER = " in WHERE for MCOD or connect as schema owner and use USER_SEGMENTS.
Use with
segment_name LIKE '<TABLE_NAME>%'
if you like to see the related indexes as well.
For partitioned objects, a join from dba_tables / dba_indexes to dba_tab_partitions/dba_ind_partitions to dba_segments
might be needed, esp. for hash partitioned tables, depending on how they have been created ( partition names SYS_xxxx).
Volker -
SQL query needed to identify cancelled invoice where distribution lines
SQL query needed to identify cancelled invoice where distribution lines Debit is not equal Credit line item in particular
Is there a way from back end FROM ap_invoice_distributions_all where we can find for the cancelled invoice where distribution lines Debit is not equal Credit line item
Regards,
Prakash RanjanHello Prakash
Can you please see if this query helps you?
SELECT i.invoice_id, i.invoice_amount, nvl(sum(d.amount),0)
FROM ap_invoice_distributions_all d, ap_invoices_all i
WHERE i.org_id = <you org_id>
AND i.invoice_id = d.invoice_id
AND d.line_type_lookup_code not in ('PREPAY')
AND i.cancelled_date IS NOT NULL
GROUP BY i.invoice_id, i.invoice_amount
HAVING (i.invoice_amount <> nvl(sum(d.amount),0))
ORDER BY i.invoice_id asc
Octavio -
Sum of the sql query after a control break
Hi all,
I need some help about getting the final sum of the sql query after doing a control break in a dynamic report, ( the control break make me the sum of each report but didn't leave me the sum of all the query)
Thanks in andvance for your help !!
EricHave a look at the text_io package:
http://www.oracle.com/webapps/online-help/forms/10g/state?navSetId=_&navId=3&vtTopicFile=f1_help/oraini/c_text_io.html&vtTopicId=
cheers -
HOW TO FIND AND CORRECT THE SQL QUERY ERRORS ????
Sometimes I get the errors while executing the sql queries.
I just wanted to know about the various ways by which I can find the sql query errors .
Any suggestions will be deeply appreciated.If you get the an error from SSMS and you can't comprehend it, you can google the error message and google would always lead you to the correction. Or you can post the error in this forum, people
here are always kind and ready to help :).
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
Oracle Apex - when I open a page the sql query runs
What do I need to change to stop the sql query running when a page is opened in Apex
the page accepts a value to search a table for relevant data. I have set a default value
every time I open the page it runs the sql query using the default valueDoes it need a default value? Why I am asking is, you could add a conditional display to your report region that would not show the report until the item has a value entered by the user..
Thank you,
Tony Miller
LuvMuffin Software
Salt Lake City, UT -
Overflow the SQL query string buffer
Hello,
I have a report that is using a query to determine values for a parameter. In Report Builder everything renders fine, but when I publish the report on the Report Server, it will not render if too many values are entered for the parameter, including "Select
All". The reason for this behavior is likely due to the number of possible values for the parameter being over 2500. My research has shown that this is causing an overflow of the SQL query string buffer. The obvious fix is to not use that column as a
parameter, but the power that be are insisting. My system administrator says he can likely increase the buffer size, but has asked me to find out how and where to do that. Any help would be much appreciated.Hi CrazyAlligator,
According to your description, you have more than 2500 values within a parameter. It throws overflow exception when selecting all values. Right?
Microsoft security update MS11-100 limits the maximum number of form keys, files, and JSON members to
1000 in an HTTP request. Because of this change, ASP.NET applications reject requests that have more than
1000 of these elements. HTTP clients that make these kinds of requests will be denied, and an error message will appear in the web browser. The error message will usually have an HTTP 500 status code. This new limit can be configured on a per-application
basis. Please see the "Resolution" section for configuration instructions. Please refer the KB article:
https://support2.microsoft.com/kb/2661403?wa=wsignin1.0
In this scenario, we need add the setting in the web.config file. Please follow the steps below:
Go to the reporting services installation folder.
Go to the report server folder and make a backup of the file “Web.config”. Once you have the backup, open the original file in notepad and add the following entry under the Configuration section:
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="10000"/>
</appSettings>
Go to the Report Manager folder and again make a backup of the file “Web.config”. Once you have the backup, open the original file in notepad and add the following entry under the appSettings tag:
<add key="aspnet:MaxHttpCollectionKeys" value="10000"/
If you have any question, please feel free to ask.
Best Regards,
Simon Hou
Maybe you are looking for
-
SSO to a Web Service from Portal
Hi All, I have EP deployed on machine A, and my web application deployed on machine B, and I need to get SSO enabled between EP and the web application. Machine B is a Windows 2003 Server, and has the ISAPI filter installed to get at the HTTP_REMOTE_
-
While trying to schedule Update stats db13 : getting access denied
HI Experts I have scheduled update statistics for all tablespaces in DB13 transaction of ECC system. Once the job completed, ended with below error, saying "Access Denied". But this SAP is on Windows system. Job started Step 001 started (program RSDB
-
Qosmio X500-128, taking forever to boot also Toshiba service station error
Hi My toshiba qosmio x500-128 is taking forever to boot up these days, iver rolled back the system using system restore, ive stopped any unessential startup services that i know are not req at startup but the system still takes forever to boot, ive a
-
Constructor accepting another class object
I have two classes. One is Address class and other is AddressBookEntry class I havebeen asked to code a constructor in AddressBookEntry class that accepts name and the Address object. Can anyone tell what I've coded is correct or not(last part of the
-
Where is i18n.jar in J2sdk1.4.1 ?
Hello, In j2sdk1.3 version, "i18n.jar" used to be in /lib directory. However i found this jar file missing in j2sdk1.4.2 version. Is it replaced by other jar file ? I couldn't find any information relating to this in SUN release notes. Can anyone hel