Re: unoptimized nested loops

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: unoptimized nested loops
Дата
Msg-id CAMkU=1whHwiBkt4t4e8Y85NT_ReLyo-qjvdpOROuW2N7dQCSug@mail.gmail.com
обсуждение исходный текст
Ответ на unoptimized nested loops  (Tim Kelly <gtkelly@dialectronics.com>)
Ответы Re: unoptimized nested loops
Список pgsql-general
On Tue, May 31, 2022 at 4:04 PM Tim Kelly <gtkelly@dialectronics.com> wrote:

c_db=>select count(id) from metadata where author like '%Kelly%';

  count
-------
   3558
(1 row)

It would be interesting to see the explain of this.  We know how many rows it found, but not how many it thinks it will find.


I do not see evidence that the nested loop is trying to reduce overhead
by using the smaller set.  It seems to want to scan on data first either
way.

The planner probably doesn't know which one is smaller.
 


I have run vacuum analyze, in the hopes that the optimizer is
miscalculating, to no avail. 

What version are you using?

Cheers,

Jeff

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: unoptimized nested loops
Следующее
От: Tom Lane
Дата:
Сообщение: Re: unoptimized nested loops