1

Is there a way we can execute sql query on the result obtained by running a second sql query on ignite cache? I have a huge dataset that needs to be filtered first based on some inputs. Once I have the filtered smaller set, I need to perform operations like calculating average, min, max, sum, standard deviation, etc. As of now, I am writing separate sql queries for all these operations but filtering is taking time which I don't want to avoid repeating. Any suggestions?

1 Answer 1

1

To run SQL query, you need to have data in the cache. Having said that, you can execute the first query and store the result in another cache, and then query this cache with the second query. This will increase memory consumption, but you will be able to reuse the result of the first query.

Sign up to request clarification or add additional context in comments.

2 Comments

But wouldn't it increase latency? creating and pushing the results on another cache. I will check how much time it takes to do that and see whether this takes lesser time as compared to filtering repeatedly. thanks for your response Valentin.
My understanding is that you want to reuse the result of the first query. It will take some time to create it, of course, but you will do this only once.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.