Execute query time
I wrote that JPQL in my code
SELECT u.paramValue FROM ParameterEntity u WHERE u.paramTag = :TAG AND u.paramType = :TYPE
when I set parameters that : TAG = MEN and TYPE = NAME it is executed 4-5 ms
but when I set parameter that : TAG =MEN and TYPE = SURNAME it is executed 30 - 45 ms
what are you thinking about it
Are you publishing the resultset after execute the query? If yes, then i say the time taken is for publishing the result set.
You could check the DB execution time by executing the query on directly on DB. And check the query plan.
As many suggests you should use the indexed/primary columns in where clause.
Mr Babakishiyev wrote:
I wrote that JPQL in my code
SELECT u.paramValue FROM ParameterEntity u WHERE u.paramTag = :TAG AND u.paramType = :TYPE
when I set parameters that : TAG = MEN and TYPE = NAME it is executed 4-5 ms
but when I set parameter that : TAG =MEN and TYPE = SURNAME it is executed 30 - 45 ms
what are you thinking about it
Similar Messages
-
Query on view - IS the querry executed each time view is referred?
I want to know whether query inside a view is executed each time when the view is being referred?
Also which on of below will be faster?
select
a1.x,
a1.y,
b1.z
from
TableA a1,
TableB b1
where
a1.keyName = 'F' || b1.someKey
OR
cretae view myView as
select
'F' || someKey as anotherKey
from
TableB
select
a1.x,
a1.y,
b1.z
from
TableA a1,
myView b1
where
a1.keyName = b1.anotherKeyA view is just a stored query, so it has to be executed each time it is referenced in a query.
The two queries should have identical performance. It might be vanishingly faster to parse the first query than the second, but I doubt you would be able to detect the difference.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
SQL Query Executing longer time
Hi , The below SQL query executing longer time . Please help to Improve the query performance. The query continuously running for more than 24 hours and failing with roolback segment error. Not getting the final output. Most of the tables are having milions of records.
Select distinct
IBS.ADSL_ACCESS_INFO,
IBS.LIJ ,
regexp_substr(OBVS.REFERENTIE_A,'[[:digit:]]+') as O_NUMBER,
DBS.CKR_NUMMER_CONTRACTANT,
DBS.DNUMBER
FROM CD.IBS,
CD.OIBL,
CD.IH,
CD.ODL,
CD.OH,
CD.DBS,
CD.OBVS
Where IBS.END_DT = To_Date('31129999', 'ddmmyyyy')
AND OIBL.END_DT = to_date('31129999', 'ddmmyyyy')
AND DBS.END_DT = to_date('31129999', 'ddmmyyyy')
AND OBVS.END_DT = to_date('31129999', 'ddmmyyyy')
AND OBVS.REFERENTIE_A LIKE 'OFM%'
AND OIBL.INFRA_KEY = IH.INFRA_KEY
AND OIBL.ORDERS_KEY = OH.ORDERS_KEY
AND IBS.INFH_ID = IH.INFH_ID
AND ODL.ORDH_ID = OH.ORDH_ID
AND DBS.DEBH_ID = ODL.DEBH_ID
AND OBVS.ORDH_ID = ODL.ORDH_ID
Order By IBS.LIJ
All the columns which are present in the where condition are having either Index/key (Primary/unique) except END_DT column.
Please AdvisePredicate pushing can help when it greatlly restricts the number of rows - you must experiment - might not work with all predicates pushed (as shown here)
select distinct
ibs.adsl_access_info,
ibs.lij,
obvs.o_number,
dbs.ckr_nummer_contractant,
dbs.dnumber
from (select infh_id,adsl_access_info,lij
from cd.ibs
where end_dt = to_date('31129999','ddmmyyyy')
) ibs,
(select infra_key,orders_key
from cd.oibl
where end_dt = to_date('31129999','ddmmyyyy')
) oibl,
(select ordh_id,regexp_substr(obvs.referentie_a,'[[:digit:]]+') as o_number
from cd.obvs
where end_dt = to_date('31129999','ddmmyyyy')
and referentie_a like 'OFM%'
) obvs,
(select debh_id,ckr_nummer_contractant,dnumber
from cd.dbs
where end_dt = to_date('31129999','ddmmyyyy')
) dbs,
cd.ih,
cd.odl,
cd.oh
where oibl.infra_key = ih.infra_key
and oibl.orders_key = oh.orders_key
and ibs.infh_id = ih.infh_id
and odl.ordh_id = oh.ordh_id
and dbs.debh_id = odl.debh_id
and obvs.ordh_id = odl.ordh_id
order by ibs.lijRegards
Etbin -
Hello! Using JRC. While creating the report for viewing, I noticed one interesting thing. Why JRC executes query two times AND first time is executed with default parameters AND if default parameters are NULL the query can be invalid (even if it is marked to convert all database NULLs to defaults in Report Options).
<!break>
1. Why do you need to execute query the first time with these default parameters, which are later set to the others? We need to make some valid default parameters to make everything work. Also it is not efficient to execute unnecessary query.
2. If I'm wrong could you explain please? If I'm right, is it a bug and when do you fix it?
Waiting for answer,
Anton Stalnuhhin
Java-developer, Webmedia AS.
-
Profile Parameter : Time out for executing query on the web
Hi gurus,
I am executing queries on the web directly. This can be done from query designer with the button that says "Execute query on web". The problem is that for queries that take more than 600 Secs to run, I get an Application timed out error. Queries that take less than this run smoothly.
Can anyone please tell me the profile parameter associated with this particular setting. It is not rdisp/max_wprun_time, I know for sure since the value for this profile parameter in my system is 9999. Please help.
Thanks & rgds,
SreeIssue resolved.
Profile Paramter - icm/server_port_0
Current Value - PROT=HTTP,PORT=8000,TIMEOUT=60,PROCTIMEOUT=600
Changed to - PROT=HTTP,PORT=8000,TIMEOUT=60,PROCTIMEOUT=3600
rgds,
Sree -
How to track querying time in ASO
Hi
I am working on an ASO cube and have lot of member formulas in the outline.
The formulas are really big and could be modified with some tweeks.
Now i want to check, whether on changing formulas, my querying time is increasing or decreasing. Is there any way or log file to track, how much time did it take when i query for set of members from my spreadsheet.
I want to compare how much seconds/min did a querying event took.Dude,
I believe the best practice here is going to be to Enable Query Tracking in the Essbase Database (Right-Click database > Query Tracking > Enable).
At this point we typically write several report scripts that simulate queries against HFR reports, etc. that the business would be pulling on a daily basis (or other frequency). You can even schedule the report scripts so that they execute at some intense frequency to check how the server handles concurrent requests, etc.
The query tracking output should then provide you with most of the infromation you seek.
Be sure to turn off query tracking for that database after you've completed your testing/exercise as it add additional processing to the database which will slow down a production server.
Some References:
http://download.oracle.com/docs/cd/E17236_01/epm.1112/eas_help/frameset.htm?qrytrack.html
http://download.oracle.com/docs/cd/E17236_01/epm.1112/eas_help/frameset.htm?dbwzagg_3.html
If this was helpful or the correct answer please award points.
Cheer,
Christian
http://www.artofbi.com -
HFR Issues - "5200: Error executing query: Invalid Item ID"
Hi All,
We are using Hyperion HFM application 11.1.1.3. Recently we have upgraded the Oralce Database to 11.2.0.2 and reconfigured the HFM application with this new database version. When I tried to run the Financial reporting through the HFR studio, I am getting error message - "5200: Error executing query: Invalid Item ID". Please could you help me to resolve this issue.
Thanks,
Aravindh KThis was due to an invalid default Point of View for the user that was incompatible with the particular report.
Change the Preferences to User Point of View Preview and run the report again.
File > Preference > Financial Reporting > Select Preview "ON" under USer Point of View box.
Re-run the report and select the desired POV.
This will prompt the user to change their POV every time he or she opens a report. They can select the correct POV and the report runs correctly.
You can turn off later. Let me know if it fixed this issue. -
JDBC receiver adapter for AS400-query time out due to Escape Symbol
Hello,
I am uisng JDBC receiver adapter for AS 400, When I execute query, the query needs to have arguments in the open and close single ticks (' 12345' )
My XML pay load looks like this, which is RFC sender. Look at dcudcstmr in <i><b>(' 838912')</b></i>. When receiver gets this message the ' (single quotes are disappeared.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:MT_Cma_Customer_Select_Request xmlns:ns1="http://freemanco.com/xi/Get_Customer">
- <Statement>
- <LawsonCustomer action="SQL_QUERY">
<access>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in <i><b>(' 838912')</b></i> and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)</access>
</LawsonCustomer>
</Statement>
</ns1:MT_Cma_Customer_Select_Request>
On the Receiver JDBC adapter I have tried with different combinations of Escape Symbol for Aposrophe as follows
<b> \
'</b>
As you know this is related to epcape character, I get following error all the time. Looks like the query is not able to execute in the specified time. My question is how do I get single quote as part of query.
<b>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in ( 100001) and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr) 2007-09-20 15:56:42 Error Unable to execute statement for table or stored procedure. 'LawsonCustomer' (Structure 'Statement') due to java.sql.SQLException:
[SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
[SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
[SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
[SQL0666] Estimated query processing time 13766 exceeds limit 8000.. Setting message to status failed. 2007-09-20 15:56:42 Error The message status set to FAIL. 2007-09-20 15:56:42 Error Returning synchronous error message to calling application: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
[SQL0666] Estimated query processing time 13766 exceeds limit 8000</b>
Any feedback or helpfull tips appreciated.
Thank you,
BalajiRaj,
Thank you for the reponse. I am using UDF on sender to generate sql statement as you see in sender XML message. After the message reaching receiver, gets executed but no response from AS400 becasue of missing single quotes in the sql query executed.
Sender XML sends
<access>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in <u><b>(' 838912')</b></u> and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)</access>
Receiver executes as
select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in ( <b><u>838912</u></b>) and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)
As you see the single quotes are missing. Like I said in previous posting I tried with following Escape Symbol for Aposrophe.
Let me know if you need more information.
Thank you,
Balaji -
Not coming out from DB Tools Execute Query
When I am removing my Ethernet connection and again connecting[for server client communication ], then sometimes the DB Tools Execute Query.vi function stucked inside and not coming outside from this function for infinite duration.
How can I come out side this function when some network issue will come?
When network connection is OK then that time there is no any problem, it actually occurs when network connection lost during the program ececution.It's hard to say what the problem is. One recomendation would be to drop usage of the database connectivity toolkit as it adds a lot of complexity and limits your options for troubleshooting problems. There is an alternative here. Read the discussion and download the drivers...
Also, what kind of database are you connecting to?
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
Where will I specify process chain and query time statistics to be loaded .
I am on BI 7.0. I see on my system, BI Statistics Technical Content has been installed because when I run
RSDDSTAT transaction under Info Provides I see cubes such as 0TCT_C01, oTC_C02, oTCT_C03, oTCT_MC01, 0TCT_VC01..
I also see process chains installed on my system such as oTCT_C2_INIT_P01, oTCT_C2_DELTA_P01.
I see various RSDDSTAT* tables being populated on my system as well.
My questions are:
1. How does data gets populated in 0TCT_C01, C02 etc? Is it by scheduling TC process chains or there are other means?
2. Where does one specify what kind of statistics will be copied from RSDDSTAT* tables. My IT lead tells me that process chain statistics are not being collected. I also thing query times are not being populated in 0TCT tables. Where can I specify what should be loaded in these cubes.
3. Does ST03N transaction display data from 2.
THANKS A LOT.Hi,
1. How does data gets populated in 0TCT_C01, C02 etc? Is it by scheduling TC process chains or there are other means?
You can find the DataSource in RSA1. For example, 0TCT_C01 is updated from 0TCT_DS01. And you need to schedule process chain 0TCT_C0_DELTA_P01 for query statistics and 0TCT_C2_DELTA_P01 for data load statistics on a regular basis. Of course, as they are delta chains, you need to first run initializaiton chains for just one time before scheduling delta chains. The initialization chains are 0TCT_C0_INIT_P01 and 0TCT_C2_INIT_P01.
2. Where does one specify what kind of statistics will be copied from RSDDSTAT* tables. My IT lead tells me that process chain statistics are not being collected. I also thing query times are not being populated in 0TCT tables. Where can I specify what should be loaded in these cubes.
As I know, the statistics data are first stored in RSDDSTAT* tables. For example, query data are stored in RSDDSTAT_OLAP. And the data are loaded to corresponding cubes when you executing InfoPackages.
You can refer to this link and search "Recording BI Statistics" in this page:
http://help.sap.com/saphelp_nw70/helpdata/en/44/3521c7bae848a1e10000000a114a6b/content.htm
3. Does ST03N transaction display data from 2.
Yes. If BI Statistics content are not activate you would be unable to view statistics data in ST03N.
Let us know if you have other questions.
Regards,
Frank -
Restricting a characteristic & query time out problem
Hi. We have the follwoing problem:
Before our BI upgrade, we have had a number of users querying different info areas, that are now having difficulty restricting on a characteristic in a query. This was performed with no problems before the upgrade.
Many times, the list of records for the particular characteristic is quite small. Either it takes 20-30 minutes for the list to appear, or the query times out (after 6000 seconds).
Any ideas?Any time you have an existing query that has been running quickly in production, and it suddenly starts to run much longer, you should be suspicious of some change to DB statisitics and or indexes.
So the first thing to do is work with your DBA to make sure the DB statistics are current for the tables involved in the query, then get an Explain Plan for the query which will show you how the DB is trying to execute the query, what indexes it uses, etc. Perhaps stats are not being refreshed after the upgrade, or something happened to an index -
10g Form - first execute query - very slow
I have the following issue:
Enter an application
open a form in enter query mode
first time execute query is very slow (several minutes)
every other time it's quick (couple seconds or less)
I can leave the form, use other forms within the app, come back and query is still quick. It's only the first time after initially launching the app.
Any ideas what might be causing this?We have the same application running in 6i client/server DB-9i in production. We are testing the upgraded application that is 10g forms on OAS DB-10g. We don't have the issue in the current production client/server app.
-
Not able to execute Query in BEx Netweaver 2004s
Hello Experts,
I'm trying to execute query on the web from BEx Netweaver 2004s.
But I get this message:
The page you are looking for might have been removed or had its name changed.
And the wired thing is I don't get host and port number in the address bar.
http:///irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=0CCA_C03_Q1000&VARIABLE_SCREEN=X&DUMMY=1
But when I execute query from BEx 3.x it works.
What settings should I check and make so that it works fine in the new version.
One of the parameter icm/server_port_0 has a timeout limit set to 150.
Thanks in advance.Thanks All of you but no luck as of now.
While manually adding host and port into the address bar i got this message:
The initial exception that caused the request to fail, was:
Connect from SAP gateway to RFC server failed
Connect_PM TYPE=A ASHOST=soanetp2:8001 SYSNR=01 GWHOST=soanetp2.GWSERV=sapgw01 PCS=1
LOCATION SAP-Gateway on host soanetp2 / sapgw01
ERROR hostname 'soanetp2:8001' unknown
TIME Fri Oct 10 15:52:43 2008
RELEASE 700
COMPONENT NI (network interface)
VERSION 38
RC -2
MODULE nixxhsl.cpp
LINE 223
DETAIL NiHsLGetNodeAddr: hostname cached as unknown
COUNTER 10
com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect from SAP gateway to RFC server failed
Connect_PM TYPE=A ASHOST=soanetp2:8001 SYSNR=01 GWHOST=soanetp2GWSERV=sapgw01 PCS=1
LOCATION SAP-Gateway on host soanetp2 / sapgw01
ERROR hostname 'soanetp2.us:8001' unknown
TIME Fri Oct 10 15:52:43 2008
RELEASE 700
While following SAP note 947148 I found that we don't have any entry in table RSPOR_T_PORTAL
What entry it should have? The note says that there should be a prefix maintained for your portal.
Hope to solve this problem this weekend and let you all know what all steps i took.
Thanks in advance
Sonu -
On execute query a save message appears
hi,
i have an item which is enabled only when enter_query is pressed. a number is given in that item which then populates the rest of the items of the same datablock when execute_query is pressed. now if i change the item/number then the message appears ' do you want to save changes'. i would like the system message NOT to appear. also i would like for that number/item to be executed. i have wriiten a code for the execute query.
any help would be nice.
also thanks in advance for your help.i have tried the execute_query(no_validate) but here the form get completely cleared. No_Validate is not even a valid parameter for Execute_Query.
i would like the same number to be executed when the execute_query pressed the second time.You don't execute a number. Do you mean that you would like the form to re-query using the same number as the query-where input?
i have written a script for execute_query in the key-exeqry trigger. Why don't you post that code here? It is very likely that whatever you are doing in that script is causing your message to appear. -
Forms Trigger Hirarchy for Execute query operation
Hi
Can anybody tell me in which order triggers are executed in oracle forms
when i press a execute query button.
ON-POPULATE-DETAILS
ON-CHECK-DELETE-MASTER
POST-QUERY
i want to write a code after completion of all the operations of execute_query
requirement is after excute_query i want to append few more record in multiline detail block of master-detail relation.
where should i write this code.
regdsPOST-TEXT-ITEM
POST-RECORD
PRE-QUERY
PRE-SELECT
POST-SELECT
POST-QUERY( x times )
ON-CLOSE
PRE-RECORD
PRE-TEXT-ITEM
WHEN-NEW-RECORD-INSTANCE
WHEN-NEW-ITEM-INSTANCE
Francois
Maybe you are looking for
-
My computer was reset to factory condition. I lost everything. I still have all my music on my itouch but cant get it back on itunes on my computer. How can I get it back?
-
How do I convert my exsisting nitro files to adobe ?
how do I convert my exsisting nitro files to adobe ?
-
We have a web application using Oracle 8.1.7. When the user enters a process button on the web we want to run the procedure in the background and we also have some jobs that needs to be run in a scheduled time. My dba is telling us to use cron in pla
-
Syslog: logging specific traffic only to syslog server
remote site is accessing onsite servers and need to lock them down based on host ip's and ports. remote site connects to onsite network thru 6509 L3. want to capture remote traffic to syslog server. (only want to capture remote site traffic, no other
-
Copying a flash file and pasting into another one...
I want to copy a .swf file I have and paste it into another one, frames and all. I have tried but nothing gets copied over correctly. Either that or my buttons are on a single frame.. and no longer act like a button with the -Over-Up-Down-Hit frame