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)
Query for each group defined in report
rali
Hello everybody,
i tried searching the forum but i did non find anything similar to my problem, which is kind of strange and probably means that i am doing something wrong.
I have a report with one query and the report design has 3 groups for the result set. The thing is that when i monitor what is happening i see that the query is not made only once and then the result set somehow used and grouped, BUT there is one query for each group. Is this normal or am i missing something? The query returns a very big set of data and is quite a big problem.
Any tips will be greatly appreciated.
Thanks,
Rali
Find more posts tagged with
Comments
mwilliams
Can you attach your report design?
rali
Hi Michael,
to be honest i don't have a copy of the initial report design, the one with the query (silly me, no backup).
The one you find attached is the report design in which i tried to use an xml request hoping that it might be faster, but the problem is the same. It initiates too many requests.
I have defined 3 different xml datasources. I honestly excpected to see 3 calls and that's it. Instead when i monitor the requests i get:
151.58.232.138 - - [02/Jan/2013:17:37:31 +0100] "GET /rest/agency?method=getAgency&token=09fd8031b24bc15862d0243f83f109b1f9a0163c&companyId=0 HTTP/1.1" 200 1966 "-" "Java/1.6.0_18"
151.58.232.138 - - [02/Jan/2013:17:37:31 +0100] "GET /rest/agency?method=getAgency&token=09fd8031b24bc15862d0243f83f109b1f9a0163c&companyId=0 HTTP/1.1" 200 1836 "-" "Java/1.6.0_18"
151.58.232.138 - - [02/Jan/2013:17:37:31 +0100] "GET /rest/ticket?method=getTickets&startDate=2012-01-01&endDate=2012-12-31&app=s&companyId=0&token=09fd8031b24bc15862d0243f83f109b1f9a0163c&ids= HTTP/1.1" 200 278600 "-" "Java/1.6.0_18"
151.58.232.138 - - [02/Jan/2013:17:37:24 +0100] "GET /rest/ticket?method=getTickets&startDate=2012-01-01&endDate=2012-12-31&app=s&companyId=0&token=09fd8031b24bc15862d0243f83f109b1f9a0163c&ids= HTTP/1.1" 200 19565780 "-" "Java/1.6.0_18"
151.58.232.138 - - [02/Jan/2013:17:37:57 +0100] "GET /rest/agency?method=getAgencies&token=09fd8031b24bc15862d0243f83f109b1f9a0163c&companyId=0&ids= HTTP/1.1" 200 1626277 "-" "Java/1.6.0_18"
151.58.232.138 - - [02/Jan/2013:17:37:36 +0100] "GET /rest/ticket?method=getTickets&startDate=2012-01-01&endDate=2012-12-31&app=s&companyId=0&token=09fd8031b24bc15862d0243f83f109b1f9a0163c&ids= HTTP/1.1" 200 19565780 "-" "Java/1.6.0_18"
151.58.232.138 - - [02/Jan/2013:17:38:07 +0100] "GET /rest/agency?method=getAgencies&token=09fd8031b24bc15862d0243f83f109b1f9a0163c&companyId=0&ids= HTTP/1.1" 200 1626277 "-" "Java/1.6.0_18"
What am i missing?
Regards,
Rali
mwilliams
If all of these calls are from the same run of the report, it appears that all 3 dataSources run, likely to gather metadata or test connections. Then, since you have two tables bound to the Union dataSet, the two dataSets that make this union run each time the joint dataSet is accessed. Since you're using the same dataSet for both tables, you might be able to use the first table as a source for the second table to avoid the two extra calls.
rali
So are those metadata or test connections really necessary or there is some way to, say, disable them from the report designer?
If i understand correctly, the calls are initiated by the tables? Does that mean that if i have one query and 2 tables that use the same query there will be always 2 calls?
Thanks
Regards,
Rali
P.S I tried using the data from the first table instead of the dataSet as you suggested. I've never done this before, so i guess in "binding" instead of "dataset" i chose "Report Item" and associated the first table, but i can't modify the groupings
I guess it is fair to not be able to rearrange the data from the first dataSet, but at least hide one of the groupings would be useful.
The first table has 2 groups, the first level is grouping by month and the second by company. In the second table i need only the grouping by month. I tried using the "hide detail" option on grouping by company, but strangely i get no results at all printed. At this point i have no idea what "hide detail" is supposed to do then.
mwilliams
The caching should be that the dataSet only runs once. However, I'm not certain how this works with a joint dataSet. I would assume it'd be the same, but it would appear not. Can you try with the same dataSets, only rather than using the union dataSet in the design, simply repeat one of the original dataSets a couple times, to see if they have repeated calls still? I'll do some testing with joint dataSets and using the table as a source on my end, too.
rali
Hi Michael,
i'm sorry it took me so long to answer, it's been a busy week.
I did some tests with one query and three tables that all used the same query with different groupings though and it all went as i hoped. I monitored only one query towards the database.
So my guess that every group starts a call was apparently wrong, or al least as far as a database is considered as a source.
Regards,
Rali
mwilliams
So, no issue, then? Or is there still something?
rali
Well, changing the datasource there is non issue for this report in particular, but i was kind of curious to understand how come it doesn't work the same way with xml as a source and it does so many calls.
Do you think that there is any documentation or something that i can read to find out more about this behaviour or the only solution is to try and guess? I checked "integrating and extending BIRT", but did not find anything about this.
Regards,
Rali
mwilliams
You could definitely download the source and take a look at the XML dataSource and dataSet code.