[rt-users] RT 3.8.9 + PostgreSQL 8.4.7 - missing/bad indexes

Dominic Hargreaves dominic.hargreaves at oucs.ox.ac.uk
Fri Apr 15 05:01:52 EDT 2011


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
> rt-bugs at bestpractical.com

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110415/8ea7f536/attachment.sig>


More information about the rt-users mailing list