Re: Left joining against two empty tables makes a query

Поиск
Список
Период
Сортировка
От Chris Travers
Тема Re: Left joining against two empty tables makes a query
Дата
Msg-id 42E9BD43.6060203@travelamericas.com
обсуждение исходный текст
Ответ на Re: Left joining against two empty tables makes a query SLOW  (Gnanavel S <s.gnanavel@gmail.com>)
Ответы Re: Left joining against two empty tables makes a query  ("Dario" <dario_d_s@unitech.com.ar>)
Список pgsql-performance
>
>     Secondly, the project table has *never* had anything in it.  So where
>     are these numbers coming from?
>
>
> pg_statistics

I very much doubt that.  I was unable to locate any rows in pg_statistic
where the pg_class.oid for either table matched any row's starelid.

Tom's argument that this is behavior by design makes sense.  I assumed
that something like that had to be going on, otherwise there would be
nowhere for the numbers to come from.  I.e. if there never were any rows
in the table, then if pg_statistic is showing 1060 rows, we have bigger
problems than a bad query plan.   I hope however that eventually tables
which are truly empty can be treated intelligently sometime in the
future in Left Joins.  Otherwise this limits the usefulness of out of
the box solutions which may have functionality that we don't use.  Such
solutions can then kill the database performance quite easily.

Chris Travers
Metatron Technology Consulting

В списке pgsql-performance по дате отправления:

Предыдущее
От: Matthew Schumacher
Дата:
Сообщение: Re: Performance problems testing with Spamassassin 3.1.0
Следующее
От: Andrew McMillan
Дата:
Сообщение: Re: Performance problems testing with Spamassassin 3.1.0