Re: number of rows estimation for bit-AND operation

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Slava Moudry <smoudry(at)4info(dot)net>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: number of rows estimation for bit-AND operation
Date: 2009-08-18 22:34:20
Message-ID: dcc563d10908181534u661d91d3q6fbaa0256582b98e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

2009/8/18 Slava Moudry <smoudry(at)4info(dot)net>:
>> increase default stats target, analyze, try again.
> This field has only 5 values. I had put values/frequencies in my first post.

Sorry, kinda missed that. Anyway, there's no way for pg to know which
operation is gonna match. Without an index on it. So my guess is
that it just guesses some fixed value. With an index it might be able
to get it right, but you'll need an index for each type of match
you're looking for. I think. Maybe someone else on the list has a
better idea.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Karl Denninger 2009-08-18 23:03:44 Re: SQL Query Performance - what gives?
Previous Message Slava Moudry 2009-08-18 22:11:20 Re: number of rows estimation for bit-AND operation