Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Redundant query
evgenyak
My report has a chart and a table. Both are using same data set.
However it seems like two queries are issued towards database and not one.
Why isn't query reused?
Find more posts tagged with
Comments
mwilliams
What is your BIRT version?
evgenyak
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="113971" data-time="1360168855" data-date="06 February 2013 - 09:40 AM"><p>
What is your BIRT version?<br /></p></blockquote>
<br />
3.7<br />
<br />
I'm not sure about minor version
mwilliams
I created a report with a table and a chart bound to the same dataSet, in 3.7.0 and wrote out to the console in the script to see if it was executed more than once. I only got one output. This was with the sample database, though. What dataSource type are you using? And does this only happen deployed? Or from the designer, too? Let me know.
evgenyak
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="113995" data-time="1360217400" data-date="06 February 2013 - 11:10 PM"><p>
I created a report with a table and a chart bound to the same dataSet, in 3.7.0 and wrote out to the console in the script to see if it was executed more than once. I only got one output. This was with the sample database, though. What dataSource type are you using? And does this only happen deployed? Or from the designer, too? Let me know.<br /></p></blockquote>
<br />
We are using Paraccel database.<br />
It happens when deployed. I just see two queries in the database log
mwilliams
Do you have any parameters bound to the dataSet? If you remove either the chart or table, does the query only run once?
evgenyak
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="113997" data-time="1360220959" data-date="07 February 2013 - 12:09 AM"><p>
Do you have any parameters bound to the dataSet? If you remove either the chart or table, does the query only run once?<br /></p></blockquote>
<br />
I removed the table and the query ran once.<br />
<br />
There are no parameters using this query. The query is using other parameters though.
mwilliams
Would you be able to use the table as the data for the chart? To do this, you'd need to name your table, in the property editor and then it'd be available from the use data from drop down, in the chart editor. Let me know.
CBR
Just another idea:
Can you select the dataset in designer and click on the Advanced Tab in the property editor while having the dataset selected. There should be a entry called Needs cache for data-engine. If this is not set to true (which is the default value...at least for 4.2.x) the query will be fired to the database each time you use the dataset in your report. Yes means that it will be fired once and cached.
mwilliams
Good call, cbrell. I didn't even think to mention that, since it is the default.
evgenyak
<blockquote class='ipsBlockquote' data-author="'cbrell'" data-cid="114357" data-time="1361294603" data-date="19 February 2013 - 10:23 AM"><p>
Just another idea:<br />
<br />
Can you select the dataset in designer and click on the Advanced Tab in the property editor while having the dataset selected. There should be a entry called Needs cache for data-engine. If this is not set to true (which is the default value...at least for 4.2.x) the query will be fired to the database each time you use the dataset in your report. Yes means that it will be fired once and cached.<br /></p></blockquote>
<br />
Great. This helps!