Re: [GENERAL] Joining 16 tables seems slow

2017-09-13 Thread Frank Millman
From: Chris Travers Sent: Tuesday, September 12, 2017 3:36 PM To: Frank Millman Cc: Postgres General Subject: Re: [GENERAL] Joining 16 tables seems slow Chris Travers wrote: On Tue, Sep 12, 2017 at 3:15 PM, Frank Millman <fr...@chagford.com> wrote: 2017-09-12 12:39 GMT+02:00

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Pavel Stehule
2017-09-12 14:01 GMT+02:00 Tom Lane : > "Frank Millman" writes: > > Pavel Stehule wrote: > >> 2017-09-12 8:45 GMT+02:00 Frank Millman : > >>> I am experimenting with optimising a SQL statement. One version uses > 4 LEFT JOIN’s and a

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Chris Travers
On Tue, Sep 12, 2017 at 3:15 PM, Frank Millman wrote: > > 2017-09-12 12:39 GMT+02:00 Pavel Stehule : > >> >> >> 2017-09-12 12:25 GMT+02:00 Frank Millman : >> >>> Pavel Stehule wrote: >>> >>> 2017-09-12 9:36 GMT+02:00 Frank Millman

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Frank Millman
2017-09-12 12:39 GMT+02:00 Pavel Stehule : 2017-09-12 12:25 GMT+02:00 Frank Millman : Pavel Stehule wrote: 2017-09-12 9:36 GMT+02:00 Frank Millman : Pavel Stehule wrote: > > 2017-09-12 8:45

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Tom Lane
"Frank Millman" writes: > Pavel Stehule wrote: >> 2017-09-12 8:45 GMT+02:00 Frank Millman : >>> I am experimenting with optimising a SQL statement. One version uses 4 >>> LEFT JOIN’s and a 5-way CASE statement in the body. The second moves the >>>

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Pavel Stehule
2017-09-12 12:39 GMT+02:00 Pavel Stehule : > > > 2017-09-12 12:25 GMT+02:00 Frank Millman : > >> Pavel Stehule wrote: >> >> 2017-09-12 9:36 GMT+02:00 Frank Millman : >> >>> Pavel Stehule wrote: >>> > >>> > 2017-09-12 8:45 GMT+02:00

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Pavel Stehule
2017-09-12 12:25 GMT+02:00 Frank Millman : > Pavel Stehule wrote: > > 2017-09-12 9:36 GMT+02:00 Frank Millman : > >> Pavel Stehule wrote: >> > >> > 2017-09-12 8:45 GMT+02:00 Frank Millman : >> >>> I am using 9.4.4 on Fedora 22. >>> >>> I

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Frank Millman
Pavel Stehule wrote: 2017-09-12 9:36 GMT+02:00 Frank Millman : Pavel Stehule wrote: > > 2017-09-12 8:45 GMT+02:00 Frank Millman : I am using 9.4.4 on Fedora 22. I am experimenting with optimising a SQL statement. One version uses 4 LEFT

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Pavel Stehule
2017-09-12 9:36 GMT+02:00 Frank Millman : > Pavel Stehule wrote: > > > > 2017-09-12 8:45 GMT+02:00 Frank Millman : > >> I am using 9.4.4 on Fedora 22. >> >> I am experimenting with optimising a SQL statement. One version uses 4 >> LEFT JOIN’s and a 5-way

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Frank Millman
Ron Johnson wrote: > On 09/12/2017 01:45 AM, Frank Millman wrote: Hi all I am using 9.4.4 on Fedora 22. I am experimenting with optimising a SQL statement. One version uses 4 LEFT JOIN’s and a 5-way CASE statement in the body. The second moves the filtering into the JOIN section, and I end

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Frank Millman
Pavel Stehule wrote: > > 2017-09-12 8:45 GMT+02:00 Frank Millman : I am using 9.4.4 on Fedora 22. I am experimenting with optimising a SQL statement. One version uses 4 LEFT JOIN’s and a 5-way CASE statement in the body. The second moves the filtering into the JOIN

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Ron Johnson
On 09/12/2017 01:45 AM, Frank Millman wrote: Hi all I am using 9.4.4 on Fedora 22. I am experimenting with optimising a SQL statement. One version uses 4 LEFT JOIN’s and a 5-way CASE statement in the body. The second moves the filtering into the JOIN section, and I end up with 16 LEFT JOIN’s

Re: [GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Pavel Stehule
hi 2017-09-12 8:45 GMT+02:00 Frank Millman : > Hi all > > I am using 9.4.4 on Fedora 22. > > I am experimenting with optimising a SQL statement. One version uses 4 > LEFT JOIN’s and a 5-way CASE statement in the body. The second moves the > filtering into the JOIN section,

[GENERAL] Joining 16 tables seems slow

2017-09-12 Thread Frank Millman
Hi all I am using 9.4.4 on Fedora 22. I am experimenting with optimising a SQL statement. One version uses 4 LEFT JOIN’s and a 5-way CASE statement in the body. The second moves the filtering into the JOIN section, and I end up with 16 LEFT JOIN’s and no CASE statements. My test involves