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)
Report runs without result
dzish
Hi,
I have "a little" problem with complicated sql query. On sql client query runs about 50 minutes and returns 30 columns and about 10000 rows.
But my BirtViewer runs all the time even sql query is finished as I see on "show processlist". I have BirtViewer on Tomcat with meny gigas of memory for it. I know it's an older BIRT 2.6.2 but is there any general suggestion about it?
Find more posts tagged with
Comments
kclark
Can you post the SQL please?
dzish
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="113983" data-time="1360179719" data-date="06 February 2013 - 12:41 PM"><p>
Can you post the SQL please?<br /></p></blockquote>
<br />
Hi,<br />
<br />
I can but I'm afraid it's useless. I use column-oriented relational database "InfoBright" where is better a little different optimization of query. <br />
<br />
Others columns are computed in dataset.<br />
<br />
For one day period it takes 40sec and duration of query is linear to period length. For example 10 days period takes 8min.<br />
My target is one month period which takes on sql client about 30minutes.<br />
<br />
SELECT <br />
m.channelId,<br />
m.channelName,<br />
(s.site_id + 0) AS siteId,<br />
CONCAT(s.site_name,'') AS siteName,<br />
(s.section_id + 0) AS sectionId, <br />
CONCAT(s.section_name,'') AS sectionName,<br />
(s.position_id + 0) AS positionId, <br />
CONCAT(s.position_name,'') AS positionName,<br />
(s.position_bannertype_id + 0) AS bannerTypeId,<br />
CONCAT(s.position_bannertype_description,'') AS bannerTypeName,<br />
SUM(IF(m.tagId = 21, m.impressions, 0)) AS packageImpressions,<br />
SUM(IF(m.tagId = 20, m.impressions, 0)) AS cptImpressions,<br />
0 AS floatingImpressions,<br />
SUM(IF(o.tagId = neexistuje, m.impressions, 0)) AS floatingImpressions,<br />
SUM(IF(m.tagId = 12, m.impressions, 0)) AS selfpromoImpressions,<br />
SUM(IF(a.defaultCampaign, m.impressions, 0)) AS defaultImpressions,<br />
SUM(IF(a.commercialCampaign && ISNULL(m.tagId), m.impressions, 0)) AS notagImpressions,<br />
SUM(IF(a.noCampaign, m.impressions, 0)) AS fallbackImpressions,<br />
MAX(mcUU.impressionUUs) AS impressionUUs,<br />
MAX(cUU.impressionUUs) AS impressionUUsForChannel<br />
FROM (<br />
SELECT<br />
ch.channel_id AS channelId,<br />
ch.channel_name AS channelName,<br />
agg.ad_pk,<br />
agg.ad_space_pk,<br />
(<br />
SELECT tagId FROM object_tag AS o<br />
WHERE objectType = "CAMPAIGN" AND agg.campaign_id = o.objectId AND o.installId=ch.channel_install_id<br />
) AS tagId,<br />
SUM(fact_count) AS impressions<br />
FROM AdServerDwhCampaignAggregates.agg_campaign_by_ad_positions AS agg<br />
JOIN ad_space_channel AS adspch<br />
ON (adspch.ad_space_pk = agg.ad_space_pk)<br />
JOIN channel AS ch <br />
ON (ch.channel_id = adspch.channel_id)<br />
WHERE (agg.sql_date BETWEEN ? AND ?)<br />
AND (agg.ad_transaction_type_pk = 1)<br />
AND (ch.channel_install_id = ?)<br />
GROUP BY ch.channel_id, agg.ad_pk, agg.ad_space_pk, tagId<br />
) AS m<br />
JOIN (<br />
SELECT agg.ad_space_pk,<br />
COUNT(DISTINCT agg.user_pk) AS impressionUUs<br />
FROM agg_user_general AS agg<br />
JOIN ad_space_channel AS adspch<br />
ON (adspch.ad_space_pk = agg.ad_space_pk)<br />
JOIN channel AS ch <br />
ON (ch.channel_id = adspch.channel_id)<br />
WHERE (agg.sql_date BETWEEN ? AND ?)<br />
AND (agg.ad_transaction_type_pk = 1)<br />
AND (ch.channel_install_id = ?)<br />
GROUP BY agg.ad_space_pk<br />
) AS mcUU<br />
ON (mcUU.ad_space_pk=m.ad_space_pk)<br />
JOIN (<br />
SELECT<br />
ch.channel_id AS channelId,<br />
COUNT(DISTINCT agg.user_pk) AS impressionUUs<br />
FROM agg_user_general AS agg<br />
JOIN ad_space_channel AS adspch<br />
ON (adspch.ad_space_pk = agg.ad_space_pk)<br />
JOIN channel AS ch <br />
ON (ch.channel_id = adspch.channel_id)<br />
WHERE (agg.sql_date BETWEEN ? AND ?)<br />
AND (agg.ad_transaction_type_pk = 1)<br />
AND (ch.channel_install_id = ?)<br />
GROUP BY ch.channel_id<br />
) AS cUU<br />
ON (cUU.channelId=m.channelId)<br />
JOIN (<br />
SELECT ad_pk,<br />
IF(campaign_state IN ('DEFAULT'),1,0) AS defaultCampaign, <br />
IF(campaign_state NOT IN ('DEFAULT') && ad.campaign_id <> 0,1,0) AS commercialCampaign,<br />
IF(ad.campaign_id = 0, 1, 0) AS noCampaign<br />
FROM ad<br />
) AS a<br />
ON a.ad_pk = m.ad_pk<br />
JOIN ad_space AS s<br />
ON s.ad_space_pk = m.ad_space_pk<br />
GROUP BY <br />
channelId,<br />
siteId, <br />
sectionId,<br />
positionId,<br />
bannerTypeId;
kclark
You could try <a class='bbc_url' href='
http://digiassn.blogspot.com/2007/10/birt-progressive-viewing-during-render.html'>this
solution</a> that allows you to view the current page while the rest of the report is still rendering.
dzish
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="114021" data-time="1360260795" data-date="07 February 2013 - 11:13 AM"><p>
You could try <a class='bbc_url' href='
http://digiassn.blogspot.com/2007/10/birt-progressive-viewing-during-render.html'>this
solution</a> that allows you to view the current page while the rest of the report is still rendering.<br /></p></blockquote>
<br />
Interesting. I'll try it.<br />
<br />
My current hack is to export query data to another table and read from this table. It works but it's only fast hack.