I ran small experiment and find out that composite queries do not use cached
data for view that are used in request.
Testcase I used:
1. Ran query A that has same subquery repeated 6 times. Time to execute - 195sec
2. Ran subquery first time - Time to execute ~ 30sec
3. Ran subquery second time - Time to execute ~ 2.5sec
4. Created view based on subquery and request data - Time to execute ~ 30sec
5. Ran view request second time - Time to execute ~ 2.5sec
6. Ran initial query with subqueries replaced with view query - Time to execute
~ 160sec
All data were static and was not updated during test.
It seems that there is no optimization of query execution plan based view,
which could potentially save a lot of time, CPU and reads. Is it possible to
include such kind of optimization in query planner?
Sincerely yours,
Kirill Lebedev
Chief Software engineer at Organizer
Original issue reported on code.google.com by kir...@organizer.com on 6 Nov 2014 at 11:01
Original issue reported on code.google.com by
kir...@organizer.com
on 6 Nov 2014 at 11:01