Arraysize in glogin.sql need install suggestion.
hello.
My co is developing software to interface with Oracle. And we would really like to change the arraysize in the glogin.sql script to be about 6000 during the installation of our program. 6000 seems to make our software run faster anything larger shows marginal performance gains.
What are the pro's/con's of doing this? (Assuming we change it to ~6000 if arraysize has not been set or set to something smaller in glogin.sql.)
Would a prompt during our install step giving the admins the choice whether to change glogin.sql be reasonable? Or should we just print a suggestion during the install and in our manuals?
thanks.
It will increase sqlplus query efficiency, but will use more memory.
BTW- The maximum you can set arraysize is 5000. So you cannot set it to 6000. Also any values more than 100 will not add significant change over when it is set to 100
Similar Messages
-
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
SudhirTry
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 -
Query performance tuning need your suggestions
Hi,
Below is the sql query and explain plan which is taking 2 hours to execute and sometime it is breaking up( erroring out) due to memory issue.
Below it the query which i need to improve the performance of the code please need your suggestion in order to tweak so that time take for execution become less and also in less memory consumption
select a11.DATE_ID DATE_ID,
sum(a11.C_MEASURE) WJXBFS1,
count(a11.PKEY_GUID) WJXBFS2,
count(Case when a11.C_MEASURE <= 10 then a11.PKEY_GUID END) WJXBFS3,
count(Case when a11.STATUS = 'Y' and a11.C_MEASURE > 10 then a11.PKEY_GUID END) WJXBFS4,
count(Case when a11.STATUS = 'N' then a11.PKEY_GUID END) WJXBFS5,
sum(((a11.C_MEASURE ))) WJXBFS6,
a17.DESC_DATE_MM_DD_YYYY DESC_DATE_MM_DD_YYYY,
a11.DNS DNS,
a12.VVALUE VVALUE,
a12.VNAME VNAME,
a13.VVALUE VVALUE0,
a13.VNAME VNAME0,
9 a14.VVALUE VVALUE1,
a14.VNAME VNAME1,
a15.VVALUE VVALUE2,
a15.VNAME VNAME2,
a16.VVALUE VVALUE3,
a16.VNAME VNAME3,
a11.PKEY_GUID PKEY_GUID,
a11.UPKEY_GUID UPKEY_GUID,
a17.DAY_OF_WEEK DAY_OF_WEEK,
a17.D_WEEK D_WEEK,
a17.MNTH_ID DAY_OF_MONTH,
a17.YEAR_ID YEAR_ID,
a17.DESC_YEAR_FULL DESC_YEAR_FULL,
a17.WEEK_ID WEEK_ID,
a17.WEEK_OF_YEAR WEEK_OF_YEAR
from ACTIVITY_F a11
join (SELECT A.ORG as ORG,
A.DATE_ID as DATE_ID,
A.TIME_OF_DAY_ID as TIME_OF_DAY_ID,
A.DATE_HOUR_ID as DATE_HOUR_ID,
A.TASK as TASK,
A.PKEY_GUID as PKEY_GUID,
A.VNAME as VNAME,
A.VVALUE as VVALUE
FROM W_ORG_D A join W_PERSON_D B on
(A.TASK = B.TASK AND A.ORG = B.ID
AND A.VNAME = B.VNAME)
WHERE B.VARIABLE_OBJ = 1 ) a12
on (a11.PKEY_GUID = a12.PKEY_GUID and
a11.DATE_ID = a12.DATE_ID and
a11.ORG = a12.ORG)
join (SELECT A.ORG as ORG,
A.DATE_ID as DATE_ID,
A.TIME_OF_DAY_ID as TIME_OF_DAY_ID,
A.DATE_HOUR_ID as DATE_HOUR_ID,
A.TASK as TASK,
A.PKEY_GUID as PKEY_GUID,
A.VNAME as VNAME,
A.VVALUE as VVALUE
FROM W_ORG_D A join W_PERSON_D B on
(A.TASK = B.TASK AND A.ORG = B.ID
AND A.VNAME = B.VNAME)
WHERE B.VARIABLE_OBJ = 2) a13
on (a11.PKEY_GUID = a13.PKEY_GUID and
a11.DATE_ID = a13.DATE_ID and
a11.ORG = a13.ORG)
join (SELECT A.ORG as ORG,
A.DATE_ID as DATE_ID,
A.TIME_OF_DAY_ID as TIME_OF_DAY_ID,
A.DATE_HOUR_ID as DATE_HOUR_ID,
A.TASK as TASK,
A.PKEY_GUID as PKEY_GUID,
A.VNAME as VNAME,
A.VVALUE as VVALUE
FROM W_ORG_D A join W_PERSON_D B on
(A.TASK = B.TASK AND A.ORG = B.ID
AND A.VNAME = B.VNAME)
WHERE B.VARIABLE_OBJ = 3 ) a14
on (a11.PKEY_GUID = a14.PKEY_GUID and
a11.DATE_ID = a14.DATE_ID and
a11.ORG = a14.ORG)
join (SELECT A.ORG as ORG,
A.DATE_ID as DATE_ID,
A.TIME_OF_DAY_ID as TIME_OF_DAY_ID,
A.DATE_HOUR_ID as DATE_HOUR_ID,
A.TASK as TASK,
A.PKEY_GUID as PKEY_GUID,
A.VNAME as VNAME,
A.VVALUE as VVALUE
FROM W_ORG_D A join W_PERSON_D B on
(A.TASK = B.TASK AND A.ORG = B.ID
AND A.VNAME = B.VNAME)
WHERE B.VARIABLE_OBJ = 4) a15
on (a11.PKEY_GUID = a15.PKEY_GUID and
89 a11.DATE_ID = a15.DATE_ID and
a11.ORG = a15.ORG)
join (SELECT A.ORG as ORG,
A.DATE_ID as DATE_ID,
A.TIME_OF_DAY_ID as TIME_OF_DAY_ID,
A.DATE_HOUR_ID as DATE_HOUR_ID,
A.TASK as TASK,
A.PKEY_GUID as PKEY_GUID,
A.VNAME as VNAME,
A.VVALUE as VVALUE
FROM W_ORG_D A join W_PERSON_D B on
(A.TASK = B.TASK AND A.ORG = B.ID
AND A.VNAME = B.VNAME)
WHERE B.VARIABLE_OBJ = 9) a16
on (a11.PKEY_GUID = a16.PKEY_GUID and
a11.DATE_ID = a16.DATE_ID and
A11.ORG = A16.ORG)
join W_DATE_D a17
ON (A11.DATE_ID = A17.ID)
join W_SALES_D a18
on (a11.TASK = a18.ID)
where (a17.TIMSTAMP between To_Date('2001-02-24 00:00:00', 'YYYY-MM-DD HH24:MI:SS') and To_Date('2002-09-12 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
and a11.ORG in (12)
and a18.SRC_TASK = 'AX012Z')
group by a11.DATE_ID,
a17.DESC_DATE_MM_DD_YYYY,
a11.DNS,
a12.VVALUE,
a12.VNAME,
a13.VVALUE,
a13.VNAME,
a14.VVALUE,
a14.VNAME,
a15.VVALUE,
a15.VNAME,
a16.VVALUE,
a16.VNAME,
a11.PKEY_GUID,
a11.UPKEY_GUID,
a17.DAY_OF_WEEK,
a17.D_WEEK,
a17.MNTH_ID,
a17.YEAR_ID,
a17.DESC_YEAR_FULL,
a17.WEEK_ID,
a17.WEEK_OF_YEAR;
Explained.
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 1245 | 47 (9)| 00:00:01 |
| 1 | HASH GROUP BY | | 1 | 1245 | 47 (9)| 00:00:01 |
|* 2 | HASH JOIN | | 1 | 1245 | 46 (7)| 00:00:01 |
|* 3 | HASH JOIN | | 1 | 1179 | 41 (5)| 00:00:01 |
|* 4 | HASH JOIN | | 1 | 1113 | 37 (6)| 00:00:01 |
|* 5 | HASH JOIN | | 1 | 1047 | 32 (4)| 00:00:01 |
|* 6 | HASH JOIN | | 1 | 981 | 28 (4)| 00:00:01 |
| 7 | NESTED LOOPS | | 1 | 915 | 23 (0)| 00:00:01 |
| 8 | NESTED LOOPS | | 1 | 763 | 20 (0)| 00:00:01 |
| 9 | NESTED LOOPS | | 1 | 611 | 17 (0)| 00:00:01 |
| 10 | NESTED LOOPS | | 1 | 459 | 14 (0)| 00:00:01 |
| 11 | NESTED LOOPS | | 1 | 307 | 11 (0)| 00:00:01 |
| 12 | NESTED LOOPS | | 1 | 155 | 7 (0)| 00:00:01 |
| 13 | NESTED LOOPS | | 1 | 72 | 3 (0)| 00:00:01 |
| 14 | TABLE ACCESS BY INDEX ROWID| W_SALES_D | 1 | 13 | 2 (0)| 00:00:01 |
|* 15 | INDEX UNIQUE SCAN | CONS_UNQ_W_SALES_D_SRC_ID | 1 | | 1 (0)| 00:00:01 |
| 16 | TABLE ACCESS BY INDEX ROWID| W_DATE_D | 1 | 59 | 1 (0)| 00:00:01 |
|* 17 | INDEX UNIQUE SCAN | UIDX_DD_TIMSTAMP | 1 | | 0 (0)| 00:00:01 |
| 18 | TABLE ACCESS BY INDEX ROWID | ACTIVITY_F | 1 | 83 | 4 (0)| 00:00:01 |
|* 19 | INDEX RANGE SCAN | PK_ACTIVITY_F | 1 | | 3 (0)| 00:00:01 |
|* 20 | TABLE ACCESS BY INDEX ROWID | W_ORG_D | 1 | 152 | 4 (0)| 00:00:01 |
|* 21 | INDEX RANGE SCAN | IDX_FK_CVSF_PKEY_GUID | 10 | | 3 (0)| 00:00:01 |
|* 22 | TABLE ACCESS BY INDEX ROWID | W_ORG_D | 1 | 152 | 3 (0)| 00:00:01 |
|* 23 | INDEX RANGE SCAN | IDX_FK_CVSF_PKEY_GUID | 10 | | 3 (0)| 00:00:01 |
|* 24 | TABLE ACCESS BY INDEX ROWID | W_ORG_D | 1 | 152 | 3 (0)| 00:00:01 |
|* 25 | INDEX RANGE SCAN | IDX_FK_CVSF_PKEY_GUID | 10 | | 3 (0)| 00:00:01 |
|* 26 | TABLE ACCESS BY INDEX ROWID | W_ORG_D | 1 | 152 | 3 (0)| 00:00:01 |
|* 27 | INDEX RANGE SCAN | IDX_FK_CVSF_PKEY_GUID | 10 | | 3 (0)| 00:00:01 |
|* 28 | TABLE ACCESS BY INDEX ROWID | W_ORG_D | 1 | 152 | 3 (0)| 00:00:01 |
|* 29 | INDEX RANGE SCAN | IDX_FK_CVSF_PKEY_GUID | 10 | | 3 (0)| 00:00:01 |
|* 30 | TABLE ACCESS FULL | W_PERSON_D | 1 | 66 | 4 (0)| 00:00:01 |
|* 31 | TABLE ACCESS FULL | W_PERSON_D | 1 | 66 | 4 (0)| 00:00:01 |
|* 32 | TABLE ACCESS FULL | W_PERSON_D | 1 | 66 | 4 (0)| 00:00:01 |
|* 33 | TABLE ACCESS FULL | W_PERSON_D | 1 | 66 | 4 (0)| 00:00:01 |
|* 34 | TABLE ACCESS FULL | W_PERSON_D | 1 | 66 | 4 (0)| 00:00:01 |
-----------------------------------------------------------------------------------------------------------------------Hi,
I'm not a tuning expert but I can suggest you to post your request according to this template:
Thread: HOW TO: Post a SQL statement tuning request - template posting
HOW TO: Post a SQL statement tuning request - template posting
Then:
a) you should posting a code which is easy to read. What about formatting? Your code had to be fixed in a couple of lines.
b) You could simplify your code using the with statement. This has nothing to do with the tuning but it will help the readability of the query.
Check it below:
WITH tab1 AS (SELECT a.org AS org
, a.date_id AS date_id
, a.time_of_day_id AS time_of_day_id
, a.date_hour_id AS date_hour_id
, a.task AS task
, a.pkey_guid AS pkey_guid
, a.vname AS vname
, a.vvalue AS vvalue
, b.variable_obj
FROM w_org_d a
JOIN
w_person_d b
ON ( a.task = b.task
AND a.org = b.id
AND a.vname = b.vname))
SELECT a11.date_id date_id
, SUM (a11.c_measure) wjxbfs1
, COUNT (a11.pkey_guid) wjxbfs2
, COUNT (CASE WHEN a11.c_measure <= 10 THEN a11.pkey_guid END) wjxbfs3
, COUNT (CASE WHEN a11.status = 'Y' AND a11.c_measure > 10 THEN a11.pkey_guid END) wjxbfs4
, COUNT (CASE WHEN a11.status = 'N' THEN a11.pkey_guid END) wjxbfs5
, SUM ( ( (a11.c_measure))) wjxbfs6
, a17.desc_date_mm_dd_yyyy desc_date_mm_dd_yyyy
, a11.dns dns
, a12.vvalue vvalue
, a12.vname vname
, a13.vvalue vvalue0
, a13.vname vname0
, a14.vvalue vvalue1
, a14.vname vname1
, a15.vvalue vvalue2
, a15.vname vname2
, a16.vvalue vvalue3
, a16.vname vname3
, a11.pkey_guid pkey_guid
, a11.upkey_guid upkey_guid
, a17.day_of_week day_of_week
, a17.d_week d_week
, a17.mnth_id day_of_month
, a17.year_id year_id
, a17.desc_year_full desc_year_full
, a17.week_id week_id
, a17.week_of_year week_of_year
FROM activity_f a11
JOIN tab1 a12
ON ( a11.pkey_guid = a12.pkey_guid
AND a11.date_id = a12.date_id
AND a11.org = a12.org
AND a12.variable_obj = 1)
JOIN tab1 a13
ON ( a11.pkey_guid = a13.pkey_guid
AND a11.date_id = a13.date_id
AND a11.org = a13.org
AND a13.variable_obj = 2)
JOIN tab1 a14
ON ( a11.pkey_guid = a14.pkey_guid
AND a11.date_id = a14.date_id
AND a11.org = a14.org
AND a14.variable_obj = 3)
JOIN tab1 a15
ON ( a11.pkey_guid = a15.pkey_guid
AND a11.date_id = a15.date_id
AND a11.org = a15.org
AND a15.variable_obj = 4)
JOIN tab1 a16
ON ( a11.pkey_guid = a16.pkey_guid
AND a11.date_id = a16.date_id
AND a11.org = a16.org
AND a16.variable_obj = 9)
JOIN w_date_d a17
ON (a11.date_id = a17.id)
JOIN w_sales_d a18
ON (a11.task = a18.id)
WHERE (a17.timstamp BETWEEN TO_DATE ('2001-02-24 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
AND TO_DATE ('2002-09-12 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
AND a11.org IN (12)
AND a18.src_task = 'AX012Z')
GROUP BY a11.date_id, a17.desc_date_mm_dd_yyyy, a11.dns, a12.vvalue
, a12.vname, a13.vvalue, a13.vname, a14.vvalue
, a14.vname, a15.vvalue, a15.vname, a16.vvalue
, a16.vname, a11.pkey_guid, a11.upkey_guid, a17.day_of_week
, a17.d_week, a17.mnth_id, a17.year_id, a17.desc_year_full
, a17.week_id, a17.week_of_year;
{code}
I hope I did not miss anything while reformatting the code. I could not test it not having the proper tables.
As I said before I'm not a tuning expert nor I pretend to be but I see this:
1) Table W_PERSON_D is read in full scan. Any possibility of using indexes?
2) Tables W_SALES_D, W_DATE_D, ACTIVITY_F and W_ORG_D have TABLE ACCESS BY INDEX ROWID which definitely is not fast.
You should provide additional information for tuning your query checking the post I mentioned previously.
Regards.
Al -
SCCM Report- Count of SQL Servers installed in my enviroment
Hello everyone,
I need to give count of SQL server installed in my organization for auditing.
i want the count of sql server edition wise ,for example,
SOFTWARE COUNT
Microsoft SQL server 2008 express - 1000
Microsoft SQL server 2010 standard - 525
There are SQL servers 2005 to 2012 including all editions in my organization.
PLEASE anyone help me.
We have SCCM 2007 in my enviroment.I am getting this error as i pulled a report
Invalid object name 'v_gs_sql_property0'.
Error Number:
-2147217865
Source:
Microsoft OLE DB Provider for SQL Server
Native Error:
208
REPORT SQL QUERY
select sys1.Netbios_name0,
max(Case sql.PropertyName0 when 'SKUName' then
sql.PropertySTRValue0 end) as [SQL08 Type]
,max(Case sql.PropertyName0 when 'SPLEVEL' then
sql.PropertyNUMValue0 end) as [SQL08 Service Pack]
,max(Case sql.PropertyName0 when 'VERSION' then
sql.PropertySTRValue0 end) as [SQL08 Version]
,max(Case sql.PropertyName0 when 'FILEVERSION' then
sql.PropertySTRValue0 end) as [SQL08 CU Version]
,max(Case sql.PropertyName0 when 'INSTANCEID' then
sql.PropertySTRValue0 end) as [SQL08 InstanceID]
,max(Case sql2.PropertyName0 when 'SKUName' then
sql2.PropertySTRValue0 end) as [SQL05 Type]
,max(Case sql2.PropertyName0 when 'SPLEVEL' then
sql2.PropertyNUMValue0 end) as [SQL05 Service Pack]
,max(Case sql2.PropertyName0 when 'VERSION' then
sql2.PropertySTRValue0 end) as [SQL05 Version]
,max(Case sql2.PropertyName0 when 'FILEVERSION' then
sql2.PropertySTRValue0 end) as [SQL05 CU Version]
,max(Case sql2.PropertyName0 when 'INSTANCEID' then
sql2.PropertySTRValue0 end) as [SQL05 InstanceID]
from v_r_system sys1
left join v_gs_sql_property0 sql on sys1.resourceid=sql.ResourceID
left join v_gs_sql_property_legacy0 sql2 on sys1.ResourceID=sql2.ResourceID
where sql.PropertyName0 in ('instanceid','SKUNAME','SPLevel','version','fileversion')
or
sql2.PropertyName0 in ('instanceid','SKUNAME','SPLevel','version','fileversion')
group by sys1.Netbios_name0 -
Linux: oracle instant client sqlplus cannot locate glogin.sql
Hi, I've downloaded and extracted instantclient and sqlplus for instant client. Added instantclient to libraries (through ldconf), added sqlplus.so to libraries also, added sqlplus executable to $PATH, installed rlwrap. I see that in sqlplus's directory there is glogin.sql. I've added "set linesize 100" there. Also I've created SQLPATH variable pointing to the directory where glogin.sql located. But it seems that when I connect to my database through 'rlwrap sqlplus name/pwd@url:port/sid' glogin.sql isn't applied. I execute 'show linesize' and it prints me default 80. Please advise.
hi,
have you had any success in resolving your glogin issue?
the recommended setting of ORACLE_HOME didn't help, neiother did ORACLE_PATH nor renaming glogin.sql to login.sql;
regards, carsten
ps:
oracle instant client 11.2.0.3.0 on win 7 x64
pps: (partial solution)
executing sqlplus in the directory where a login.sql file is located did the trick for me
Edited by: user10304394 on 24.04.2012 22:35 -
Failed SQL express install on Server 2008 Standard
I am attempting to install Visual Web Developer 2008 Express Edition on a Server 2008 Standard SP2, which all ready includes SQL Server 2008. The installer includes SQL Server Express, which is failing without any error codes.
Visual Web Developer only partly installs. The tools folder has a shortcut to Remote Debugger, as the only component to succeed. It seems this is the newest version of Visual Studio compatible with Server 2008 Standard.
My real goal is to create an empty Win Forms site bound to its existing SQL Server 2008 and then drop my completed development site pages into the production server. I need a successful complete install.
Thanks,
KurtHello,
Based on your description, you had install SQL Server 2008 Standard edition, and you try to install the Visual Web Developer 2008 Express Edition SP1 with SQL Server 2008 Express, but SQL Server install failed with this error message: "A component could not
be downloaded".
When install SQL Server express, it will download files from website, please verify the issue is not caused by the network issue.
You can try to review the SQL Server Setup log for more details. The dafult path is:
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\LOG\.
You can also try to download the SQL Server 2008 express from the following link and install separately.
http://www.microsoft.com/en-in/download/details.aspx?id=1695
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
Need Hardware Suggestion.
I need to test compatibility of my “browser accessed” application on the Mac platform. My target test case is 10.5.6 and Safari 3.2.1 and Firefox 3.0.6
Which is the cheapest Apple (computer) hardware in which I can run this configuration to test my application’s interface compatibility?
(Application is data-grid intensive Microsoft .Net 3.5 / MVC, SQL Server)Which is the cheapest Apple (computer) hardware
The MacMini -
Pogo games won't load - cleared cache, uninstalled and reloaded firefox, reloaded plugins, uninstalled and reloaded java, uninstalled and reloaded adobe flash - nothing is working - need NEW suggestions please.
Try doing these steps:
Install Firefox 11 from [http://www.getfirefox.com www.getfirefox.com]. simply install it over your current version of Firefox to make sure all Windows Registry settings get recreated correctly.
Run all Windows Updates. Service packs, etc. You may have to run this several times to ensure that you get all needed updates.
Download and Install MalwareBytes Anti-Malware, run a full Scan. [http://www.malwarebytes.org/ http://www.malwarebytes.org/]. This helps check that there are no viruses on your computer causing issues. You can uninstall this program after you clean off any infections.
Update your graphics driver (Firefox uses your graphics card for some rendering, and an out of date graphics card driver can cause problems. [https://support.mozilla.org/en-US/kb/how-do-i-upgrade-my-graphics-drivers https://support.mozilla.org/en-US/kb/how-do-i-upgrade-my-graphics-drivers].
After doing all these steps, try restarting your computer, and seeing if Pogo will run.
If it doesn't work, go into your control panel, and uninstall every installation of Java and Flash that you have. Restart your computer again, then install them from [http://fpdownload.macromedia.com/pub/flashplayer/current/licensing/win/install_flash_player_11_plugin_32bit.exe http://fpdownload.macromedia.com/pub/flashplayer/current/licensing/win/install_flash_player_11_plugin_32bit.exe] for Flash, and [http://javadl.sun.com/webapps/download/AutoDL?BundleId=62313 http://javadl.sun.com/webapps/download/AutoDL?BundleId=62313] for Java. again, restart your PC, then test.
Try to start Firefox in [[Safe mode|Safe mode]]. This mode disables all extensions, user customizations, hardware acceleration, etc. temporarily for diagnostic and troubleshooting. If Firefox works find in Safe Mode, then this is likely an add-on issue. Restart Firefox in normal mode, then type "About:addons" (without the quotes) in the address bar. Disable your extensions one by one, restarting Firefox between each one, until you find the trouble maker. Once you do, you can disable that add-on and report the issue to that add-on's developer.
If it does not help the issue, open up your Firefox Profile. [[Backing up your information|Backing up your information]] shows you where that is stored by default. Delete or rename the "pluginreg.dat" file (make sure Firefox is closed when you do this). Test again. -
Please advise on how I can get a PL/SQL script to work when a user logs onto the database. I wrote the a good script which works but when I tried puting it in $ORACLE_HOME/sqlplus/admin/glogin.sql it does not run. I used @ (example @script.sql), run and start and all failed. It only worked when I typed the whole script out (line by line) in glogin.sql. This is on Oracle8 database on Solaris 7.
Thank you,
Markuser489948 wrote:
Hello,
I have a glogin.sql file on Oracle 11gR2 server (Linux Box), and also set SQLPATH to proper location. When I start SQL*Plus from the server, all settings in glogin.sql work properly. However, when I start SQL*Plus from Oracle Client (Windows Box and there is no login.sql on this Client) to connect to that DB server, I could not see any settings.
I want all users who connect to the this database have the identical settings in their SQL*Plus. Is there any setting needed in Client side??
Thanks in advance!!!Not a rhetorical question below.
how can a directory path that is valid for NIX server also be valid for WINDOWS* client;
when SQLPATH is actually an OS environmental variable? -
Need a suggestion for change in cv02n tcode
Hi all,
Need a suggestion to update the additional tab / classification in cv02n transaction.
I want to update the charecterstics(custom) in the additional tab(and also in classification tab).
Thanks & regards
PavanHi all,
Found solution -
XML validation in pl/sql without installing java?
Hi!
Is it possible to validate xml documents in pl/sql without installing java in Oracle 10.2?What do you mean?
We can manuplate [url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i160550]XML Datatype in SQL, additionaly we can use some packages such as [url http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_xmlgen.htm#sthref11099]DBMS_XMLGEN, [url http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_xmlpar.htm#sthref11213]DBMS_XMLPARSER etc in PL/SQL. -
Accessing Sql Express install done by SharePoint 2013 Foundation
What is the proper instance name to access the sql engine installed by a SharePoint Foundation 2013 install? (I tried <boxname>\SqlExpress but it didn't work.)
Also, what password,by default,is assinged to the "sa" in this setup?
TIA,
edm2sa would be disabled by default. I believe the SQL Server Configuration Manager is installed with Express, which would tell you the instance name.
Trevor Seward
Follow or contact me at...
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
Do I need Install VS in test agent
Hi. I have test agent in my local TFS 2013. I try execute remotely CodedUI Test from Build Definition. But I see error:
Exception Message: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. (type FileNotFoundException)
Exception Stack Trace: at Microsoft.TeamFoundation.Lab.Workflow.Activities.ExecuteRemoteTestRun2.TestRunCreation.CreateTestRun(CodeActivityContext context, ITestManagementService testManager, ITestManagementTeamProject project)
at Microsoft.TeamFoundation.Lab.Workflow.Activities.ExecuteRemoteTestRun2.TestRunCreation.Execute(CodeActivityContext context)
at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
So. In Virtual Machine didn't install Visual Studio 2013. Do I need install VS to test agent to solve this problem?
Or If I will put this missing library's in some folder in test agent. Can I use it, when I execute test?Hi Max,
I am glad to hear you resolved the issue. Thanks for sharing your experience here, it is good to other members who experience the same issue in the community.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Need a suggestion about Hierarchy ...
Hi All,
Greeting.
I have a requirement to change Hierarchy dynamically.
e.g. Cost Center Hierarchy
Node 1 ==> Level 1
Node 1.2 ==> Level 2
Node 1.3 ==> Level 3
CC 100001
Node 2 ==> Level 1
Node 2.2 ==> Level 2
CC 100002
Requirement:
1. Add CC 100002 under Node 1.2
2. Delete Node 2.2
My Question is whether there is Interface that user can play with hierarchy so user can add/delete the node.
Perhaps, the interface can be in ABAP program / Javascript / etc.
My Idea is like this:
1. I download the Hierarchy, with that Interface I can play with the Hierarchy.
2. Using that Hierarchy, I can generate some CSV file, than I upload the Hierarchy using the flat-file.
3. But before I upload it, I erase the Hierarchy first.
But now, I'm still confuse with what the Interface it, that can make user play with the Hierarchy.
Really need your suggestion ..
Thanks a lot all and have a good day,
Best regards,
Daniel N.Either use java.net.URLConnection or Jakarta's HttpClient. Either way, you will need to familiarize yourself with Java's I/O package java.io. In particular, you will want to see how java.io.InputStream works. There are extensive I/O tutorials on this site and the Net in general.
- Saish -
What version of Acrobat do I need installed...
What version of Acrobat do I need installed to use the AcroAVDoc and CAcroPDDoc objects in .NET? The trial does not let me install Acrobat standard, I know it works with professional and it doesn't work if nothing is installed.
Acrobat Standard, Professional or Pro Extended.
Maybe you are looking for
-
Results of multiple queries in one report
Hi I would like to create one report with multiple rows and each row should display result of a different query. I guess I can use multiple report on one region or multiple regions in one place. (1)However is there a more elegant way of creating a si
-
Hi, I have a couple of questions on RF programming.... 1. Batch Input I was always under the impression that we should NOT use BDC in RF screens but, while searching SDN, I saw Rich Heilmann mention that he does it ([SDN Thread|Re: Radio Frequency -
-
Is Photoshop Touch compatible with d2 Android tablet?
I have Android version 4.1.1 but when I go to the app store it says photoshop touch is not compatible with my tablet. My tablet is a d2 9'' tablet. I can't find out why it is not compatible.
-
Any way to erase part of the center in Premiere?
Greets, I am trying to edit together part of a television show, including the opening and closing sequences. In this particular show, the network has put a square in the middle of the screen where they are showing a promo, and left the remainder of t
-
What is the download size of the Aperture trial application?