cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ari Maniatis (JIRA)" <>
Subject [jira] [Commented] (CAY-2005) Improving generated DISTINCT performance on PostgreSQL
Date Thu, 30 Apr 2015 23:47:06 GMT


Ari Maniatis commented on CAY-2005:

It seems to me that DISTINCT ON is quite a different thing to DISTINCT and just adding the
word "ON" isn't a cue for "make my query go faster please" but rather a very different way
of executing the query which presupposes a certain ordering. I can't see how that could be
extended to a general purpose ORM unless we were able to detect what the first ordering was
and suppress the "ON" if that didn't match.

> Improving generated DISTINCT performance on PostgreSQL
> ------------------------------------------------------
>                 Key: CAY-2005
>                 URL:
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 4.0.M3
> The problem is described here:  Auto-generated
DISTINCT keyword when translating SelectQuery results in slowdown of PostgreSQL queries (won't
be surprised if this affects other DBs as well). Alternative PostgreSQL syntax "DISTINCT ON(id1,
id2, ..)" solves the issue.

This message was sent by Atlassian JIRA

View raw message