If bindParametersForCollection fires will a query definitely execute?
Hi
I have an ADF BC application written in Jdev 10.1.3. The user is reporting performance problems in one part of the application. We have a CustomViewObjectImpl which overrides the bindParametersForCollection method and outputs the following message
System.out.println("### Executed Query here for View Object "+getFullName());This message is output 3 times indicating the view object query is executed 3 times. I have accounted for 2 of them but I can't for the life of me see why the VO query is executing a third time.
I wondered if this message is accurate in saying that the VO query is executing when the bindParametersForCollection is fired?
I put a message in the view objects class file. In the executeQueryForCollection method is
String calling = new Throwable().fillInStackTrace().getStackTrace()[1].getClassName();
System.out.println("called by <"+calling+">");This only fires once - before the first "Executed Query here for View Object".
thanks
paul schweiger
I found what was causing the third execute query - there was a reference to #{bindings.WsWanalItemsView1Iterator.estimatedRowCount} in one of the items on the page.
Am I right to presume that estimatedRowCount causes the same performance hit executing the view object's query?
Similar Messages
-
How can i know which index will be used when executing the query ?
1 ) I have query in which i have 3-4 tables but there multiple index on one column .
so how can i know which index will be used when executing the query ?
2) I have a query which ia taking too much time . how can i know which table is taking too much time ?
3) Please Provide me some document of EXplain plan ?Hi Jimmy,
Consider the below example
/* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
CREATE TABLE FIRST AS
SELECT * FROM all_objects;
UPDATE FIRST
SET object_name = 'TEST'
WHERE owner != 'SCOTT';
CREATE INDEX idx_first ON FIRST(object_name);
SELECT *
FROM FIRST
WHERE object_name = 'TEST';
It has not used index
Execution Plan
Plan hash value: 2265626682
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 58678 | 7334K| 163 (4)| 00:00:02 |
|* 1 | TABLE ACCESS FULL| FIRST | 58678 | 7334K| 163 (4)| 00:00:02 |
/* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
SELECT *
FROM FIRST
WHERE object_name = 'emp';
This has used the index
Execution Plan
Plan hash value: 1184810458
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 128 | 1 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| FIRST | 1 | 128 | 1 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | IDX_FIRST | 1 | | 1 (0)| 00:00:01 |
From this we can come to the conclusion that, whether to use one index or not by oracle
would also depend on the data which is present in the table. This has to be this way as
we see in the bind peeking, if oracle sticks to only one plan, say only use the full table
scan, it would be a performance hit when it searches for the second query ie where object_name
='emp';
2.
If we have a query like below.
select * from emp
where upper(ename) = upper(:p_ename);
Evenif we have the index on ename column, oracle wouldn't be able to use the index, as there is a function in the predicate column. If you need oracle to use the index, we need to create a function based index as below.
Create index idx_ename on emp(upper(ename));
Regards,
Cool -
Characteristic "Master Data" setting in Query definition not working?
Hi,
I am having a problem with a query definition. (BI 7.0)
The query comprises the following definition which relate to displaying Milestone dates for respective projects in a time series so the dates are populated in the correct column in a time series:
Filter
Project Definition = Fixed Single Project Definition
Fiscal Year Variant = K4
Project Profit Centre = Hierarchy Node
Project Plant = Fixed Single Value
Free Chars
Network
Network Activity
Activity Element
Rows
Project Plant
Project Profit Centre (With hierarchy)
Project Definition
Milestone Type (Setting in characteristic to pick up Master Data)
CSR Relevant (Setting in characteristic to pick up Master Data)
Structure
Actual
Scheduled
(Actual: Value type = Actual, Origin = Manual ,Event = Start)
(Scheduled: Value type = Actual, Origin = Scheduled ,Event = Start)
Columns
Key Figure structure of 12 key figures in a time series
Selection
Key Figure = Date
Fiscal Year/Period = Current Fiscal Year / Period (SAP EXIT) (With Offset 1 to 12)
FYI
When I run the above it comes back correctly. However when I add "MILESTONE" (Characteristic setting (Posted Values) to the Query Definition immediately after the "Milestone Type" and before CSR it does not work it just is hanging for a considerable time.
I am not using "Master Data" for the "Access Type for Result Vales" for the additional characteristic "MILESTONE" just "Posted Values".
I was expecting that it would just show all Milestone types as per Master Data but just the Milestones that are posted for this result.
I would appreciate a solution to this issue and an explanation to why it hangs when I add the "MILESTONE" characteristic to the definition as explained above.
Thanks in advance..
StevoHello there,
Putting Milestone in the rows in the query definition is not being hang there (i.e., while creating and saving the query) right?
It is stucked while executing the query isn't it so?
That's because you have too many records to be desaggregated by milestone characteristic, and this is indepently of posted values in the characteristic settings.
Putting milestone characteristic in the free characteristics will allow you to run the query, but desaggregate it (add it to the rows) will be to much information to read from your dataprovider (this is just a guess).
If it is being stucked in query execution whike milestone is in the rows. Try this for example:
Add milestone to the free chars. Execute the query. Filter milestone characteristic while still in the free rows and choose a value that you are pretty sure has the smallest records in the Dataprovider (could be for example value #). Than drill down milestone to the rows. You'll see that it can be executed without any problem.
Diogo. -
Date field not working in Query definition
Hello Experts ,
I am trying to prepare one report which will pull some fields ( extended fields ) from Rfx header page and display in the report . For this I have made one query definition and written SQL query . Now all fields except the date fields are successfully fetched and displayed by the query . Only when I am adding the date field inside "result field" tab , the query is throwing error like -
" ORA-00904: "EFFECTIVE_START_DATE": invalid identifier "
but this field name is correct .
Any formatting needs for this field ?
Regards
SudiptaHi Sudipta,
Thanks for your reply.
Actually I have created a diferent extension field and want to add that field in Results fields of particular Query Definition. But when I use it Tablename.Extension_Field_Name, its giving below exception
ORA-00904: "t"."fieldname": invalid identifier
Any idea what needs to be taken care of while using extension fields in Queries.
Thanks,
Saloni -
Not able to change query definition
I am working with BI 7.0.
In 3.5 I can change the query definition from the display results (Excel) of the query run, but from BI 7.0 I am not able to make changes to the query definition from the query displayed results. Is there an easy and quick way to do this? I would have to go to the Tools->Create new query and change the query from there.Hi,
When you run the query in BI Analyser, you have a 'Tools' button in the BEx Analysis Toolbox; when you click on it, you will get an 'Edit Query' option which will directly open your query definition. You can modify your query now and run it again from there back in excel.
Please note that for getting this option, your query must be running and the cursor must be placed on some cell of the query. -
How to validate a Query without executing it?
How to validate a Query without executing it?
For example if I have:
ReadAllQuery myQuery = new ReadAllQuery(myClass);
myQuery.setSelectionCriteria(myExpression);
What can I do to have must validation as possible been done before executing the query?
Validation that could be done are:
- Expression reference fields that really exist in TopLink mapping
- Literal provided to expression are of compatible type
- Parameter setting set against the query are all compatibleYour could prepare the query.
query.prepareCall(session, record);
This will do all query validation and generate the SQL for the query. -
Select the Key Figures to be presented in a query before execute the it
Hi,
I want to select(through checkbox) the Key Figures to be presented in a query before executing the query. I'm creating BEX queries and web templates (I'm working on BEX 7.0).
I haven't found clear post about this so if you have implemented something like this please help me and share your solution.
Kind regards,
AnaHi,
If you set a property of your KF as "Hide and can be shown", you will get a filter option for these KFs after executing the report in the navigational block of web report.
When you click on that filter, you will get the list of KFs, then you can select the desired KFs using check box.
Regards,
Yogesh. -
QBE style(Find-Execute) Query not executing when VO has bind parameter
I have an Entity Based ViewObject that is composed of 3 Entities so the entities are related through an Assoc. Then the ViewObject also has a bind paremeter defined and used in the WHERE clause.
In my page everything is fine until when I use/click on the Find operation on the JSF page. When the Find operation is executed the page/form goes blank so I can enter by QBE query. Now when I Execute my search by executing the ExecuteWith params operation. Nothing is happening to the screen, it seems that query was not executed. Although there was no errors or exceptions displayed.
However if I remove the bind parameter, and execute the Execute operation instead after going to Find mode, the query is executed properly and I get expected results.
My problem is a bit general, but are there anyone who had a similar problem like this? Im still in the process of creating a test case.
regards,
AntonHi Frank,
But the "ExecuteWithParams" operation provides the bind variable right? (i had the value hardcoded on the pagedef). So it must have supplied a value. I also noticed that this is happening only when if the VIewObject contains two or more Entities. If the Viewobject has only 1 entity, the ViewObject queries properly.
Anyway Frank, I had found a fix for this. I set an InvokeAction on the pagedef that binds to the ExecuteWithParams that is invoked during page load only(!postback condition). and then I just use the Find-Execute operations instead of the Find-ExecuteWithParams operations that I used previously.
I will try to replicate the issue again to investigate what's really going on. I just want to know if its a bug or just an expected behavior or i just made a mistake.
regards,
Anton -
Database migration query not executing in database
We moved over our SQL database to another server. We have a few .cfm template files that have queries to get 'content' from our database. These queries in the .cfm template files work fine and execute properly. However, for some reason, since we moved over our database, the queries in the actual database don't execute/run anymore. In the old server we didn't have this problem. Our queries in the database would run properly then. The data would display correctly on the webpages.
Is there some kind of properties setup that was overlooked when migrating over our database?
The output we now see when viewing our pages is the actual query code.
Example:
SELECT lname
FROM table
This is actually displayed on the website and therefore the query is not executing/running. Our code was never changed. So why is it not outputting the same?
Thanks for any help provided.Sorry for the confusion.
The coldfusion templates and database queries both worked fine on the previous old server.
Now since the migration onto the new server, only the coldfusion templates work fine, but not the queries in the database.
So for example, a query in the coldfusion template will run fine, and execute the intial pull of data. But once the content is pulled from the database, the queries inside the database (including stored procedures) don't execute.
We do get the expected results when we run our stored procedure in Management Studio and if we put the stored procedure on a standalone web page we do see the records.
We only see the sql code when we have the stored procedure inside of our w_content table of our database, and its being called by the first query in the template. For some odd reason the stored procedure does not execute if it is inside the database.
Hopefully that clarifies our problem.
Thank you for helping! -
Problem Refreshing Query Definition on Workbook
Hi guys ....i have a very strange case.....in 3.5 users can execute workbooks without problems and also can change global and local definition of the query on formulas and keyfigures....but the column header texts are not updated in workbook....i have a description for columns and rows on workbook and another description on definiton of query....i checked the "goto query defintion on refresh" on properties and nothing happens...headers are not refreshed.....
I hope somebody could help me
RegardsHi,
Is there any macro written which may be overwriting the column header.
If this is not the case then you must have saved workbook when it was last edited by editing the column headers. You can change in workbook the heqader column and then see whether the column header is taken from query definition or what you have saved in workbook.
Regards,
Niraj -
Error from bex query while executing in portal
Dear Experts,
while executing the query bex analyzer, is working ok but the same query when executing in portal is throwing the following error:
error message:
The initial exception that caused the request to fail was:
Termination message sent
ABEND RS_EXCEPTION (000): The argument '0,01' cannot be interpreted as a number
MSGV1: The argument '0,01' cannot be interpreted as a
MSGV2: number
Messages
ABEND: The argument '0,01' cannot be interpreted as a number
ABEND: An exception with the type CX_SY_CONVERSION_NO_NUMBER occurred, but was neither handled locally, nor declared in a RAISING
ABEND: Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
I tried to find from existing blogs but did not get suggestions for similar issue.
Coud some be kind enought to analyse this error.
Inputs will highly been appreciated
Thanks in advance,Hi,
Here I tried retransporting the depended bex queries accross the landscape.
Now the reports are OK from the Portal.
Thanks,
Mannu -
List of triggers which fire in enter query mode?
hello experts , please tell me list of forms trigger which fire in enter query mode?
thanks
yashI don't believe there is a published list, but if you check the Forms help system the description of each trigger will tell you if it fires in "Enter Query" mode. Unfortunately, you will need to check each trigger in the help system and build your own list.
Craig... -
Form trigger - fire in enter query mode
Hello,
Could someone help me with the following problem, please?
I want to create an key-exeqry and I want it to execute in enter-query mode. Unfortunatly Designer set's the property 'fire in enter query mode' for the trigger to 'No'. I can't find any setting to set it to 'Yes'. Does someone knows a setting or a work-around?
I'm working with designer6/headstart6.
Thanks in advance,
Martine.Sandra,
I tried to put the key-exeqry in the template. There's only one problem the key-exeqry is a 'in place of' trigger. When I put the code 'Null;' in the trigger, a generated form without a key-exeqry doesn't work because the 'key execute query' does nothing. A generated form with a key-execute query works fine.
At the other hand, when I put the code 'Execute_query' in the trigger, a generated form without a key-exeqry works fine, but the other one doesn't.
Which code should I include in the template-trigger?
Thanks,
Martine. -
How to compare to query definitions ?
Hello community of experts,
Does anyone know how to compare two query definitions without looking at either the query builder or query results?
I want to prove that two queries are identical only by looking at the BW system itself.
BACKGROUND
For `certifying` queries that were developed directly in production we have the practice of transporting queries backwards to development, renaming them to a new namespace, and then transporting them forward to production again.
The queries that were transported up from the dev system cannot be changed in the prod system (except by another transport, and this makes those queries `certified`).
My goal is to automate the proof, making it easier to create the test documents required for transporting out of development again.
If we can proove that the query being transported out has the same query definition as the query the user wrote in production, then life will be a lot easier.
The query definitions are complex, which means eyeballing the query builder isn't reliable. And often the DEV & QA systems don't have the data needed for comparing the query results.
Thanks for your help!
KeithI used the following:
rszcomdir
rsrrepdir
rszeltxref
rszeltdir
rszelttxt
rszcel
rszcalc
rszselect
rszrange
rszopratxt
the SAP transaction uses function module RSZ_DB_ELT_GET (it might already be available in 3.5... but then again, it might not)
good luck! -
CPU Cost of a Query without executing it?
Is there any mathematical formula to find CPU cost of a query without executing it? Thanks
902181 wrote:
Is there any mathematical formula to find CPU cost of a query without executing it? ThanksAny why do you want the cost? What do you expect it to tell you? How are you planning to apply this in your code? Make sure you understand what cost tells you and what it does not tell you. And use that value in a sane fashion.
As for an alternative to using EXPLAIN PLAN, you can simply parse a SQL into a cursor without executing it. Then determine the SQL cursor id and address and use DBMS_XPLAN to display its execution plan.
E.g.
SQL> create or replace procedure ParseSQL( sqlStatement varchar2 ) is
2 c integer;
3 begin
4 c := DBMS_SQL.open_cursor;
5
6 DBMS_SQL.parse(
7 c,
8 sqlStatement,
9 DBMS_SQL.native
10 );
11
12 DBMS_SQL.close_cursor( c );
13 end;
14 /
Procedure created.
SQL>
SQL> var sqlID varchar2(100)
SQL> var childNumber number
SQL> var sqlText varchar2(4000)
SQL> begin
2 ParseSQL( 'select /* TEST1 */ * from emp' );
3
4 select
5 sql_text, sql_id, child_number into :sqlText, :sqlID, :childNumber
6 from v$sql
7 where sql_text like 'select /* TEST1 */%';
8 end;
9 /
PL/SQL procedure successfully completed.
SQL>
SQL> col PLAN_TABLE_OUTPUT format a50
SQL> select
2 rownum, p.plan_table_output
3 from TABLE( DBMS_XPLAN.Display_Cursor( :sqlID, :childNumber, 'BASIC,COST' ) ) p;
ROWNUM PLAN_TABLE_OUTPUT
1 EXPLAINED SQL STATEMENT:
2 ------------------------
3 select /* TEST1 */ * from emp
4
5 Plan hash value: 3956160932
6
7 -----------------------------------------------
8 | Id | Operation | Name | Cost (%CPU)|
9 -----------------------------------------------
10 | 0 | SELECT STATEMENT | | 3 (100)|
11 | 1 | TABLE ACCESS FULL| EMP | 3 (0)|
12 -----------------------------------------------
13
13 rows selected.
SQL> The problem is extracting intelligence from the output as it is raw text. Perhaps not that complex as a where clause can be added to only display line id 0 and then extract the cost value from that line. Regular expressions (not my forte) will likely do this easily.
Maybe you are looking for
-
we added an automatically updated date at the bottom of the page to show users how often the website is updated and now the date shows up not only in small script at the bottom of the page, but in large script underneith the table that we use to orga
-
WLS - MDB & Credential Mappings
Hi all, I've an EAR application that contains some MDB EJBs and for MDB authentication I configured for each of them the Credential Mappings tab under Security section. It works well. For the configuration I used the WLS console but now I need to aut
-
Java Embedding for writing string into file
Hi , According to my requirement I need to create a file and write string data into file. This string data I am getting as a output of the partner link. Their is 5 string variable which I need to write in file . I want to use java Embedding activity
-
Email messages from my icloud account update on all my devices showing if they have been read and if a reply has been sent. This does not happen with my tinyworld (TalkTalk) email account. Can I (how can I) get this to work with TinyWorld?
-
Lion Server and TimeMachine Error 13
Hello, I have a problem with a Lion Server and TimeMachine service. I have enabled the service and selected a volume for it. The server creates the share and does not report aby errors. If I go to a client machine and open TM I can see the "Backup