> Anyway, thanks a lot for the input :-) so, this will still make it 
> easily into jOOQ 3.0-RC2 and 2.7  


No problem, glad to have helped rather than complicated an issue for once 
:) 

>  I wonder, though, if all optimisers can handle the transformation 
>  efficiently. I'm not afraid for Oracle, but are these the same queries 
>  in MySQL? 

I think its fair to say that a good number will execute the whole sub query 
into a temp table and then count up the results, but thats not as bad as it 
first seems

  1) At least it did not happen across the wire between the server and the 
client.

  2) If the query is then executed to get the results and the server has 
enough RAM to cache all the pages from the first run the second run will be 
a lot faster.

Doing counts on certain DBs is costly anywhere so its useful for you to 
offer the feature, but I would not worry to much about how it ends up being 
handled, just think about how bad it can get in an JPA based environment.

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to