BIRT query is executed twice [message #1782443] |
Fri, 23 February 2018 14:30 |
Leonardo Pinho Messages: 3 Registered: February 2018 |
Junior Member |
|
|
Hello all,
I have noticed that when generating a report with BIRT, the same SQL query is executed twice. First time with limit 1 and 2nd time with default limit.
2018-02-23T14:18:44.107184Z 4 Query SET SQL_SELECT_LIMIT=1
2018-02-23T14:18:44.107184Z 4 Query select id from game where id >= 1
2018-02-23T14:18:44.125145Z 4 Query SET SQL_SELECT_LIMIT=DEFAULT
2018-02-23T14:18:44.125145Z 4 Query select id from game where id >= 1
I'm using MySQL DB (5.7) - jdbc mysql driver 5.1.45 (I also tried it w/ 5.1.35). I tried it with BIRT 4.5, 4.6 and 4.7.
I also tried to add "?cacheResultSetMetadata=true" to the JDBC connection URL as it seems the first SQL is used to retrieve metadata (column names, types, etc.), but it didn't help.
It looks similar to this old bug - marked as resolved:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=234553
The issue is even worse when using report parameters as the first SQL does not use the parameters which provoke big performance issues:
2018-02-22T20:12:27.769128Z 51 Query SET SQL_SELECT_LIMIT=1
2018-02-22T20:12:27.769644Z 51 Query select id,username from customer where id = '' and username != ''
2018-02-22T20:12:27.783031Z 51 Query SET SQL_SELECT_LIMIT=DEFAULT
2018-02-22T20:12:27.783031Z 51 Query select id,username from customer where id = 123123 and username != 'dsdsadsa'
Any idea what I could do? This affects badly the performance of the report.
Thanks,
Leonardo
|
|
|
|
Powered by
FUDForum. Page generated in 0.04700 seconds