Search Postgresql Archives

Re: unoptimized nested loops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 31, 2022 at 4:04 PM Tim Kelly <gtkelly@xxxxxxxxxxxxxxxxx> 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux