Thanks Lukas i will add alias and that should solve the problem.

One more issue which am noticing while profiling the code is the difference
between the query execution time in DB and the actual time to fetch the
data through jooq .

Here is the sample

This is the actual time taken to fetch the results from the DB is 40 ms
(postgres)

But the profiler results from Jprofiler shows it took totally 80ms and
below is the snapshot


[image: Inline image 1]


Like you see above 79 secs is allocated to AbstractQuery.execute function ,
i cant understand why is it taking double the time . Can you help me ?

Regards,
vishwanath.M







On Tue, Oct 17, 2017 at 4:50 PM, Lukas Eder <[email protected]> wrote:

> Hi Vishwanath
>
> (I've noticed, this discussion accidentally went off-list. Putting the
> mailing list in CC again, redacting the content)
>
> Indeed, the auto-generation of an alias for derived tables in
> SelectQueryImpl.asTable() should be faster. I thought there was a pending
> issue to fix this, but I cannot seem to find it. I've added an issue here:
> https://github.com/jOOQ/jOOQ/issues/6714
>
> The problem is, we need an alias for derived tables, and if you don't
> provide it explicitly, that's probably the best way to go right now
> (discussion will be in #6714)
>
> You can always work around this problem by creating an explicit alias for
> your subquery, e.g. by calling Select.asTable("alias") or
> table(select).as("alias").
>
> I hope this helps,
> Lukas
>
> 2017-10-17 13:03 GMT+02:00 Vishwanath M:
>
>> Hi Lukas,
>>
>> This way of accessing is name was really helpful . Now am facing issues
>> in the below code
>>
>>
>> Most of time is spent when i convert a select to table and the profiler
>> shows it spends most of the time in org.jooq.impl.Tools.hash . May i know
>> the reason ?
>>
>> Thanks,
>> Vishwanath.M
>>
>

-- 
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/d/optout.

Reply via email to