Search Postgresql Archives

Re: Bad plan on a huge table query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 21, 2013 at 10:53 AM, Daniel Cristian Cruz <danielcristian@xxxxxxxxx> wrote:
And now, it runs, at least:

http://explain.depesz.com/s/GDJn

No one could send a guess on it?

Without showing either the query, or the definition of the tables, you are not giving us much to go on.

I'm particularly interested in what inicio is and what idx_aula_confirmacao_2 is.  If inicio is already a date, why is being cast to date?  And if it is not already a date, how can it be used in the index scan?



        ->  Index Scan using idx_aula_confirmacao_2 on aula_confirmacao  (cost=0.01..7582.88 rows=4442 width=24) (actual time=64.017..81747.794 rows=101508 loops=1)"
                          Index Cond: (((inicio)::date >= date_trunc('YEAR'::text, now())) AND ((inicio)::date <= now()))"

 Cheers,

Jeff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux