Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Criteria Distinct on (column)(SELECT DISTINCT ON (COL))
Criteria Distinct on (column) [message #1745102] Wed, 05 October 2016 08:15
Asaf Natan is currently offline Asaf NatanFriend
Messages: 3
Registered: October 2015
Junior Member
looking at the sql eclispelink has genrated when applying select(..).where(..).distinct(true) , i have found out that i get much better performance if i just distinct on the id column and the orderby field making sure i have an appropriate index on a5,a1,
Meaning :
SELECT DISTINCT ON (a1,a5) ........... ORDER BY a5
here the id is a1 and the order by field is a5,
i was wondering is there any way to achieve this using eclipselink ,
i have seen the group by operator and reading the info online you can use it as a distinct replacement , the issue is that i have not been able to reproduce the performance of the query above using it....

Previous Topic:EciplseLink Caching - Strange behaviour
Next Topic:Calling stored procedure in Oracle with complex object type parameters
Goto Forum:

Current Time: Mon Mar 30 14:57:03 GMT 2020

Powered by FUDForum. Page generated in 0.01941 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top