Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine.
От | Greg Stark |
---|---|
Тема | Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. |
Дата | |
Msg-id | 87ad7icsxw.fsf@stark.dyndns.tv обсуждение исходный текст |
Ответ на | Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. (Rajesh Kumar Mallah <mallah@trade-india.com>) |
Ответы |
Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine.
Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. |
Список | pgsql-performance |
Rajesh Kumar Mallah <mallah@trade-india.com> writes: > Nopes the query are not Equiv , earlier one returns 4 rows and the below one > none, Sorry, i lowercased a string constant and dropped the lower() on email. Try this: SELECT * FROM tickets WHERE id IN ( SELECT groups.instance FROM groups JOIN principals ON (groups.id = principals.objectid) JOIN cachedgroupmembers ON (principals.id = cachedgroupmembers.groupid) JOIN users ON (cachedgroupmembers.memberid = users.id) WHERE lower(users.emailaddress) = 'mallah_rajesh@yahoo.com' AND groups.domain = 'RT::Ticket-Role' AND groups.type = 'Requestor' AND principals.principaltype = 'group' ) AND type = 'ticket' AND effectiveid = tickets.id AND (status = 'new' OR status = 'open') ORDER BY priority DESC LIMIT 10; -- greg
В списке pgsql-performance по дате отправления: