Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Queries with blank paramter
Rainer
Hi all,
after logging queries sent by Birt (Version 2.3.1) to mysql I determined that Birt often send queries twice to the database. The parameter of the the first query is blank in the second query the parameter is substituted correctly. Is this a common problem? In one discussion thread I read about such behaviour in combination with date parameters but in my case the parameter is a simple string. Does anyone knows about this behaviour and how to avoid it?
Thanks Rainer
Find more posts tagged with
Comments
mwilliams
Hi Rainer,
A couple questions. How are you using the query? Are you using a dynamic parameter with it? If so, this could be calling the dataSet to get field values for the user to select from. Also, where are you doing the testing at? If you're testing in the designer, it may just be the query jumping out to get the MetaData, which only looks at one row, so it wouldn't need the parameter.
Let me know.
Rainer
hi mwilliams,
yes, I am using a dynamic parameter, but I don´t think, its the parameter query which cause this behaviour. The first Query is submitted and after the Query made a full table scan the second is (correct) is submitted. This behaviour is maybe no problem with a small amount of data in one table, but in my table there are about 20.000.000 records.
This is the situation:
The log file shows the following:
Parameter Query from mysql log
select
distinct(key03)
from
IA__ACCOUNT__MONTH
where
source_ts = 200812
and key03 like 'OS%' and key03 not like 'OS0171'
1st Query from mysql log
select
SOURCE_TS as monat,
KEY03 as art,
sum(FIELD_NUM) as menge
from
IA__ACCOUNT__MONTH
where
SOURCE_TS
between period_add(date_format(curdate(),'%Y%m'),-13)
and period_add(date_format(curdate(),'%Y%m'),-1)
and KEY03 = ''
group by key03, source_ts
2nd Query from mysql log
select
SOURCE_TS as monat,
KEY03 as art,
sum(FIELD_NUM) as menge
from
IA__ACCOUNT__MONTH
where
SOURCE_TS
between period_add(date_format(curdate(),'%Y%m'),-13)
and period_add(date_format(curdate(),'%Y%m'),-1)
and KEY03 = 'OS0013'
group by key03, source_ts
mwilliams
Rainer,
Is this log file from the designer or the deployed viewer? As I said in my last post, if it's from the designer, it would pass the query to the database to get the metadata.
Rainer
hi mwilliams,
I´ve integrated RE api in jsf application. The log is the result from report execution from within my application...