Re: [SQL] OR clause causing strange index performance

2004-05-28 Thread Atesz
Hi! I read your JOIN - Index Scaning - OR problem. I don't understand why you decomposed JOINs two brach (ul1 and ul2). If I understand your problem well I can suggest the next idea for your QUERY (you don't need two branch): SELECT * FROM permissions p INNER JOIN users u ON u.id = p.i

[SQL] About intervals

2004-05-28 Thread Pablo Velasquez Rivas
Hi all. I have a table with some timestamps fields. For example this table:           date1    |         date2    -+---  2004-03-01 11:20:00 | 2004-03-01 11:55:00 If I do a query like this, I get:  SELECT date2 - date1 as diff

Re: [SQL] About intervals

2004-05-28 Thread Bruno Wolff III
On Fri, May 28, 2004 at 12:27:53 -0600, Pablo Velasquez Rivas <[EMAIL PROTECTED]> wrote: > > but if I do a query like this, I get: > / SELECT date2 - date1 as diff FROM table WHERE date2 - date1 >= > interval '15:00';/ > * diff > -- > (0 rows) > * > What can I do to do a query like the prev