Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-09-07 Thread Alena Rybakina
Hi, I rebased the patch and fixed earlier problem. On 03.09.2025 00:20, Alena Rybakina wrote: I'll look at this. I need some time to consider it. I'm working on this approach right now. I introduced mutator and made the transformation if it is possible there but I need to fix some bugs. From

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-09-02 Thread Alena Rybakina
Hi! Thank you for your attention to this patch! On 03.09.2025 00:07, Ilia Evdokimov wrote: On 04.06.2025 13:40, Alena Rybakina wrote: Do you have any ideas on how to solve this problem? So far, the only approach I see is to try an alternative plan but I'm still learning this. Hi, I've rev

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-09-02 Thread Ilia Evdokimov
On 04.06.2025 13:40, Alena Rybakina wrote: Do you have any ideas on how to solve this problem? So far, the only approach I see is to try an alternative plan but I'm still learning this. Hi, I've reviewed this patch, and I have suggestion about the approach. Currently, the patch extends '

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-06-04 Thread Alena Rybakina
Hi, all! I updated the patch and it looks nice. All the problems have been solved. On 03.04.2025 16:56, Ilia Evdokimov wrote: On 02.04.2025 19:39, Alena Rybakina wrote: I see that I need to add a walker that, when traversing the tree, determines whether there are conditions under which pull

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-04-05 Thread Alena Rybakina
Hi! My colleague reviewed my patch and gave feedback on how to improve it - for some queries with data types that I did not consider, pull-up is not applied, although it should. Some of them: EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) SELECT 1   FROM ta  WHERE EXISTS (

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-04-03 Thread Ilia Evdokimov
On 02.04.2025 19:39, Alena Rybakina wrote: I see that I need to add a walker that, when traversing the tree, determines whether there are conditions under which pull-up is impossible - the presence of volatility of functions and other restrictions, and leave the transformation for the var o

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-02-11 Thread Alena Rybakina
On 10.02.2025 23:51, Ilia Evdokimov wrote: On 09.02.2025 18:14, Alena Rybakina wrote: Hi! I found another example where the transformation worked incorrectly and reconsidered the idea. As for conversion of exists_sublink_to_ANY, we need to get the flattened implicit-AND list of clauses and p

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-02-10 Thread Ilia Evdokimov
On 09.02.2025 18:14, Alena Rybakina wrote: Hi! I found another example where the transformation worked incorrectly and reconsidered the idea. As for conversion of exists_sublink_to_ANY, we need to get the flattened implicit-AND list of clauses and pull out the chunks of the WHERE clause that

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-02-09 Thread Alena Rybakina
Hi! I found another example where the transformation worked incorrectly and reconsidered the idea. As for conversion of exists_sublink_to_ANY, we need to get the flattened implicit-AND list of clauses and pull out the chunks of the WHERE clause that belong to the parent query, since we are cal