Re: Is there a good discussion of optimizations?

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Guyren Howe <guyren(at)gmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Is there a good discussion of optimizations?
Date: 2020-12-28 14:14:50
Message-ID: CAHOFxGpNO_yMNafWG_cLH6DZDBaOZ39u=4tA+yXTgF3F1RZ7QA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 23, 2020 at 6:56 PM Guyren Howe <guyren(at)gmail(dot)com> wrote:

> I’d like to put together a good video and writeup about what the…
> philosophy behind relational databases is.
>
> Most folks, in my experience, who use relational databases don’t really
> understand the basic theory or even more important the why — the philosophy
> — of what a relational database is and how to get the most out of them. I
> see a lot of folks trying to use SQL in an imperative manner — make this
> temp table, then update it some, then make this other temp table, etc… I
> see this particularly among analysts who for some reason often prefer SQL
> Server. I think this is down to afaict SQL Server having an abominable
> query optimizer.
>

I find temp tables quite helpful to get needed and consistent performance
when doing large data warehouse type queries on source data especially when
it isn't fully & properly normalized. Many row estimates being low because
of correlation with specified client_id and sometimes having 15-25 tables
involved in a report, has meant that temp tables (that are analyzed to
ensure statistics are present) have seemed the best tool for the job.
Perhaps that's all a hack though.

I look forward to when extended statistics may help with join planning and
building out a comprehensive warehouse that facilitates use of simpler
queries, but for now the "imperative straight-jacket" seems to help more
often than it hurts.

>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hellmuth Vargas 2020-12-28 21:27:49 Re: Partitioned Table conversion to Non-Partition table in postgresql open source
Previous Message Andreas Kretschmer 2020-12-28 11:15:54 Re: PostgreSQL HA