| From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
|---|---|
| To: | Frank Millman <frank(at)chagford(dot)com> |
| Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: a JOIN to a VIEW seems slow |
| Date: | 2017-09-21 13:54:56 |
| Message-ID: | CAHyXU0wQC_vHnpV6=_XcCU73pKeMDXYQVMjtN-t2QRVQeM7V6Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, Sep 21, 2017 at 1:51 AM, Frank Millman <frank(at)chagford(dot)com> wrote:
> On 2017-09-18 Frank Millman wrote:
>>
>> Here are the timings for running the query on identical data sets using
>> Postgresql, Sql Server, and Sqlite3 -
>>
>> PostgreSQL -
>> Method 1 - 0.28 sec
>> Method 2 – 1607 sec, or 26 minutes
>>
>> Sql Server -
>> Method 1 – 0.33 sec
>> Method 2 – 1.8 sec
>>
>> Sqlite3 -
>> Method 1 – 0.15 sec
>> Method 2 – 1.0 sec
>>
>> It seems that Sql Server and Sqlite3 are able to analyse the ‘join’, and
>> execute an indexed read against the underlying physical tables.
>>
>
> I did not get any response to this, but I am still persevering, and feel
> that I am getting closer. Instead of waiting 26 minutes for a result, I
> realise that I can learn a lot by using EXPLAIN. This is what I have found
> out.
Something is not adding up here. Can you EXPLAIN ANALYZE the 26 minute query?
merlin
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G. Johnston | 2017-09-21 15:10:04 | Re: hard parse? |
| Previous Message | Peter Koukoulis | 2017-09-21 12:48:10 | hard parse? |