Re: [PERFORM] SQL With Dates

2009-04-21 Thread Robert Haas
On Mon, Apr 20, 2009 at 9:55 AM, Rafael Domiciano wrote: > Hello People, > > I have initiated a work to review the sqls of our internal software. > Lot of them he problem are about sql logic, or join with table unecessary, > and so on. > But software has lot of sql with date, doing thinks like: >

Re: [PERFORM] SQL With Dates

2009-04-20 Thread Mark Lewis
It sounds like what you're doing is comparing the planner's cost estimate from running EXPLAIN on a few different queries. The planner's cost estimate was never intended to do what you're trying to do; it's not an absolute scale of cost, it's just a tool that the planner uses to get relative compa

Re: [PERFORM] SQL With Dates

2009-04-20 Thread Scott Marlowe
On Mon, Apr 20, 2009 at 7:55 AM, Rafael Domiciano wrote: > Hello People, > > I have initiated a work to review the sqls of our internal software. > Lot of them he problem are about sql logic, or join with table unecessary, > and so on. > But software has lot of sql with date, doing thinks like: >

Re: [PERFORM] SQL With Dates

2009-04-20 Thread Rafael Domiciano
Hello Grzegorz, Thnks for response, but lot of the selects is using BETWEEN and the cost is the same. 2009/4/20 Grzegorz Jaśkiewicz > BETWEEN X AND Y > > On Mon, Apr 20, 2009 at 2:55 PM, Rafael Domiciano > wrote: > > Hello People, > > > > I have initiated a work to review the sqls of our inter

Re: [PERFORM] SQL With Dates

2009-04-20 Thread Grzegorz Jaśkiewicz
BETWEEN X AND Y On Mon, Apr 20, 2009 at 2:55 PM, Rafael Domiciano wrote: > Hello People, > > I have initiated a work to review the sqls of our internal software. > Lot of them he problem are about sql logic, or join with table unecessary, > and so on. > But software has lot of sql with date, doin