From: | Mariel Cherkassky <mariel(dot)cherkassky(at)gmail(dot)com> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>, pgsql-performance(at)lists(dot)postgresql(dot)org |
Subject: | Re: postgresql 10.1 wrong plan in when using partitions bug |
Date: | 2018-02-04 15:28:52 |
Message-ID: | CA+t6e1m-m94iJTSD3X+uKJ_=c6dMCjL5ntWMf_d-T6JM8z=S2A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
I read those two links and I dont think that they are relevant because : 1
1)I didnt do any join.
2)I used a where clause in my select
2018-02-04 17:25 GMT+02:00 Justin Pryzby <pryzby(at)telsasoft(dot)com>:
> On Sun, Feb 04, 2018 at 05:06:38PM +0200, Mariel Cherkassky wrote:
> > Great, it solved the issue. Seems problematic that the planner do full
> > scans on all partitions in the first case isnt it ? Seems like a bug ?
>
> See also:
> https://www.postgresql.org/message-id/20170725131650.
> GA30519%40telsasoft.com
> https://www.postgresql.org/message-id/20170825154434.
> GC16287%40telsasoft.com
>
> Justin
>
> 2018-02-04 16:54 GMT+02:00 Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>:
> >
> > >
> > >
> Am 04.02.2018 um 13:19 schrieb Mariel Cherkassky:
> > >
> > >> I checked the plan of the next query :
> > >> explain select count(*) from log_full where end_date between
> > >> to_date('2017/12/03','YY/MM/DD') and to_date('2017/12/03','YY/MM/
> DD');
> > >>
> > >>
> > > can you rewrite the query to
> > >
> > > ... where end_date between '2017/12/03' and '2017/12/03'
> > >
> > > maybe the planner should be smart enough to do that for you, but
> obvously
> > > he can't. So it's a workaround, but it seems to solve the problem.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-02-04 15:35:32 | Re: postgresql 10.1 wrong plan in when using partitions bug |
Previous Message | Justin Pryzby | 2018-02-04 15:25:32 | Re: postgresql 10.1 wrong plan in when using partitions bug |