Re: SELECT statement returns in 10seconds, but INSERT/CREATE TABLE AS with same SELECT takes 7 minutes

2018-09-27 Thread Arjun Ranade
On Thu, Sep 27, 2018 at 3:33 PM Justin Pryzby wrote: > On Thu, Sep 27, 2018 at 03:37:57PM -0400, Arjun Ranade wrote: > > Yes, that join is concerning (red text below). The conditions all need > to > > be checked so they are independent. > > You can play with the join con

Re: SELECT statement returns in 10seconds, but INSERT/CREATE TABLE AS with same SELECT takes 7 minutes

2018-09-27 Thread Arjun Ranade
s 178 rows On Thu, Sep 27, 2018 at 2:52 PM Justin Pryzby wrote: > On Thu, Sep 27, 2018 at 01:08:05PM -0400, Arjun Ranade wrote: > > When I look at the EXPLAIN ANALYZE output, it seems that it's using a > > drastically different query plan for the INSERT+SELECT than SELE

Re: SELECT statement returns in 10seconds, but INSERT/CREATE TABLE AS with same SELECT takes 7 minutes

2018-09-27 Thread Arjun Ranade
timization. I wonder if there is a class or book these details better. Anyway, thank you so much for pointing me in the right direction. Best, Arjun On Thu, Sep 27, 2018 at 1:21 PM Tom Lane wrote: > Arjun Ranade writes: > > I have a strange performance situation that I cannot resolve

SELECT statement returns in 10seconds, but INSERT/CREATE TABLE AS with same SELECT takes 7 minutes

2018-09-27 Thread Arjun Ranade
e would be much appreciated. Thanks, Arjun Ranade