Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
MikeKulls
Contributor II
Contributor II

QlikSense changes queries

We have QlikSense connecting to a MapR hadoop cluster via ODBC. The query that is written in Qlik is different to the query that gets passed through to the ODBC server. eg this

SELECT col1, col2, col3
FROM tblA
JOIN tblB on tblA.ID = tblB.ID
JOIN tblC on tblB.ID = tblC.ID

comes through something like

SELECT col1 AS `C_43578923459873`, col2 AS `C_345698723459873`, col3 AS `C_378456234589`
FROM tblA AS `C_4567`
LEFT OUTER JOIN tblB AS `C_3435` ON `C_4567`.ID = `C_3435`.ID
JOIN (SELECT .... FROM tblA AS `C_6789`) ON ....
etc

I've truncated the second query for brevity. Basically it mangles all the column and table names and then makes every join a subquery. If the table had 8 joins then we end up with 7 subqueries. We get subqueries within subqueries. Note I haven't written the second query 100% accurately, take it as just an example of what it is doing. The mangling of names is OK but the subqueries makes the query horrendously inefficient, turning a 21 second query into 2 hours and causing it to use massive database resources.

First question, can anyone confirm QlikSense is doing this? It is not impossible something else is doing it (but seems unlikely)
Second question, how do we stop it from doing this?

I have tested from DBeaver, Python and Hue and none of them show this behaviour. For these clients the query gets sent though exactly the same.

Thanks for any replies.

Labels (3)
3 Replies
MikeKulls
Contributor II
Contributor II
Author

I would add, the changed query I extracted from the MapR logs. This is the query as it is passed to the database.

MikeKulls
Contributor II
Contributor II
Author

Bump

marcus_sommer

Qlik doesn't execute any SQL else transferred just the statement per driver to the data-base and returned on this way back the results. So it seems that your used driver caused the issue. Maybe there is anything to configure whereby I rather think you need a different one.