QRDS + cached_query results is very slow

Hi guys,

Thanks for the great product!

I’m using self-hosted redash v10.1.0 (2589bef1) for testing.

There is a configuration where I have a query_1 (JSON data source) and a query_2 (QRDS) for postprocessing of the query_1 results.

Query_1 works approx 13 sec and returns around 300 lines. Query_2 (select * from cached_query_1) also works 13 sec.
Shouldn’t it be faster as it takes cached results?

I also tried ‘select * from query_1’ without cache and it works 26 sec…
Is it my wrong setup? Or what else I can check?

Thank you in advance!

Interesting report!

It sounds to me like the query itself takes very little time (less than 1 second). But serializing the query result is taking 13 seconds. How long are each of these lines? Do they return JSON data? What is the size of the result in KB or MB?

Thanks for the reply!

When I was trying to reproduce this issue, I found the problem )

Before my Query_2 was:

select * from cached_query_1
/* select * from query_1 */

And it took 13 sec.
Today I removed the last commented line and it took 0 sec ))

So it seems that query parser doesn’t take comments signs into account, and as commented line has non-cached query_1 expression, it works without cache.

Shall I send this issue to github?

Anyway, thanks for your help!

You can file an issue for this. Much better if you can open a PR with the fix :wink:

1 Like