| From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
|---|---|
| To: | Rafael Domiciano <rafael(dot)domiciano(at)gmail(dot)com> |
| Cc: | pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: SQL With Dates |
| Date: | 2009-04-20 18:59:12 |
| Message-ID: | dcc563d10904201159n7c59221ck1c71e6eb5f4e831@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
On Mon, Apr 20, 2009 at 7:55 AM, Rafael Domiciano
<rafael(dot)domiciano(at)gmail(dot)com> 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:
> [..]
> date >= '2009-04-01' AND
> date <= '2009-04-15'
> [..]
>
> Redoing the SQL with fix date (date = '2009-04-01') o cost in explain always
> still about 200 or less. But with a period the cost is high, about 6000 or
> more.
Yep. Because you'll be getting more rows. More rows == more cost. TANSTAAFL.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mark Lewis | 2009-04-20 20:04:47 | Re: SQL With Dates |
| Previous Message | Rafael Domiciano | 2009-04-20 18:48:28 | Re: SQL With Dates |