On Fri, Apr 15, 2011 at 12:09:58PM +1000, Jesse Vincent wrote:
> On Thu 14.Apr'11 at 15:26:33 +0200, Václav Ovsík wrote:
> > SELECT  * FROM Groups WHERE Instance = ? AND LOWER(Domain) = LOWER(?) AND 
> > LOWER(Type) = LOWER(?)
> > 
> > e.g. one my bind params: 106431 'RT::Ticket-Role' 'Requestor'
> > 
> > rt=# EXPLAIN ANALYZE SELECT * FROM Groups WHERE Instance = 106431 AND 
> > LOWER(Domain) = LOWER('RT::Ticket-Role') AND LOWER(Type) = 
> > LOWER('Requestor');
> >                                                          QUERY PLAN         
> >                                                      
> 
> I'd actually consider this a code bug. We shouldn't be LOWER()ing either 
> of those parameters.  Please open a ticket by mailing
> [email protected]

There are already a couple of related bugs:

<http://issues.bestpractical.com/Ticket/Display.html?id=8568>
<http://issues.bestpractical.com/Ticket/Display.html?id=13056>

(linked from
<http://requesttracker.wikia.com/wiki/DatabaseIndexes> where I
documented the same index change that I found useful).

More in the thread starting
<http://lists.bestpractical.com/pipermail/rt-users/2009-November/062329.html>

-- 
Dominic Hargreaves, Systems Development and Support Team
Computing Services, University of Oxford

Attachment: signature.asc
Description: Digital signature

Reply via email to