Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » 'Needs cache for data engine' default in Kepler? report very slow.
'Needs cache for data engine' default in Kepler? report very slow. [message #1392244] Wed, 02 July 2014 03:47 Go to next message
Colin Sutton is currently offline Colin SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
I have a report with one table nested inside another, the outer table sets
a global variable with the value of a column in the OnCreate script; the
inner table is based on a dataset with a this.queryText based on the global
variable.
With helios the report displays different (correct) data in each row in
under a second.
With Kepler 4 .3.2 the report always displays the same value in each row as
in the first row.
I found that the dataset advanced property 'needs cache for data engine' is
defaulted to false in Helios, true in Kepler.
if I set it to false in Kepler the report gives the correct result, but
takes 10 seconds to run.
Is this a bug?

--
Colin Sutton
Re: 'Needs cache for data engine' default in Kepler? report very slow. [message #1396185 is a reply to message #1392244] Tue, 08 July 2014 00:59 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Can you attach your report design or better yet one with the sample dataset set up the same way that will show me the time difference between the two? I'll see what I can figure out.

Michael

Developer Evangelist, Silanis
Re: 'Needs cache for data engine' default in Kepler? report very slow. [message #1401876 is a reply to message #1396185] Wed, 16 July 2014 07:43 Go to previous messageGo to next message
Henning von Bargen is currently offline Henning von BargenFriend
Messages: 23
Registered: May 2011
Junior Member
The dataset cache takes the result from the cache if the dataset is executed again with the same parameters.
If I understand correctly, your outer DS writes a global variable. In the beforeOpen of the inner DS, you are using this variable to modify the SQL query.

In this situation, you should add a parameter (say, param_XXX) to your DS and set its value to the global variable's value in the beforeOpen event or using the parameter binding button in the layout. Then you could add a line like this at the end of your SQL query:

and ? is not null

(well, this will only work if the value is actually not null, but you get the point).

The query still works as before, but this way the cache knows that the query result depend on the global variable.
Re: 'Needs cache for dat a engine' default in Kepler? report very slow. [message #1401983 is a reply to message #1401876] Wed, 16 July 2014 10:37 Go to previous message
Colin Sutton is currently offline Colin SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Henning von Bargen <forums-noreply@xxxxxxxx> wrote:
> The dataset cache takes the result from the cache if the dataset is
> executed again with the same parameters.
> If I understand correctly, your outer DS writes a global variable. In the
> beforeOpen of the inner DS, you are using this variable to modify the SQL query.
>
> In this situation, you should add a parameter (say, param_XXX) to your DS
> and set its value to the global variable's value in the beforeOpen event
> or using the parameter binding button in the layout. Then you could add a
> line like this at the end of your SQL query:
>
> and ? is not null
>
> (well, this will only work if the value is actually not null, but you get the point).
>
> The query still works as before, but this way the cache knows that the
> query result depend on the global variable.

Yes, you understand correctly. If what you say is true, the cached query
result will always be used even if a global variable has changed. This is
not the behaviour in the Helios release - my case was based on a community
example using a global variable to change a beforeOpen statement - I think
it's a bug.

I will try using a hidden parameter instead of the global variable.
--
Colin Sutton
Previous Topic:Optional Report Parameter
Next Topic:Add a .jar to the project
Goto Forum:
  


Current Time: Thu Apr 18 05:28:59 GMT 2024

Powered by FUDForum. Page generated in 0.02322 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top