cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAY-2005) Improving generated DISTINCT performance on PostgreSQL
Date Wed, 29 Apr 2015 10:57:06 GMT

    [ https://issues.apache.org/jira/browse/CAY-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14519128#comment-14519128
] 

Andrus Adamchik commented on CAY-2005:
--------------------------------------

Yeah, according to http://www.postgresql.org/docs/9.4/static/sql-select.html#SQL-DISTINCT
"The DISTINCT ON expression(s) must match the leftmost ORDER BY expression(s)." ... Nothing
is simple :) .. we'll think what to do about it.

> Improving generated DISTINCT performance on PostgreSQL
> ------------------------------------------------------
>
>                 Key: CAY-2005
>                 URL: https://issues.apache.org/jira/browse/CAY-2005
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 4.0.M3
>
>
> The problem is described here: http://markmail.org/message/j7alu33vfm7rjeba  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
(v6.3.4#6332)

Mime
View raw message