Skip site navigation (1) Skip section navigation (2)

Re: Random Page Cost and Planner

From: David Jarvis <thangalin(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Random Page Cost and Planner
Date: 2010-05-25 06:41:29
Message-ID: AANLkTil7Hq5RIqAHVwXbpKkfdtZSKg_UsQeNgJuTGMdI@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
Hi,

I changed the date comparison to be based on year alone:

    extract(YEAR FROM sc.taken_start) >= 1900 AND
    extract(YEAR FROM sc.taken_end) <= 2009 AND

The indexes are now always used; if someone wants to explain why using the
numbers works (a constant) but using a date (another constant?) does not
work, I'd really appreciate it.

Thanks again, everybody, for your time and help.

Dave

In response to

pgsql-performance by date

Next:From: Joachim WorringenDate: 2010-05-25 07:59:56
Subject: performance of temporary vs. regular tables
Previous:From: Łukasz DejnekaDate: 2010-05-25 06:37:11
Subject: Re: Certain query eating up all free memory (out of memory error)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group