Re: [PERFORM] Yet another abort-early plan disaster on 9.3

2014-10-10 Thread Tomas Vondra
On 10.10.2014 19:59, Craig James wrote: > On Fri, Oct 10, 2014 at 9:53 AM, Tomas Vondra > wrote: > > > On 10.10.2014 16:21, Craig James wrote: > > Our index is for chemical structures. Chemicals are indexed on > > chemical fragments > >

Re: [PERFORM] Yet another abort-early plan disaster on 9.3

2014-10-10 Thread Craig James
On Fri, Oct 10, 2014 at 9:53 AM, Tomas Vondra wrote: > > On 10.10.2014 16:21, Craig James wrote: > > Our index is for chemical structures. Chemicals are indexed on > > chemical fragments > > . A search > > typically starts with 50-200 indexed "col

Re: [PERFORM] Yet another abort-early plan disaster on 9.3

2014-10-10 Thread Tomas Vondra
On 10.10.2014 14:10, Tomas Vondra wrote: > Dne 10 Říjen 2014, 13:16, Greg Stark napsal(a): >> On Thu, Oct 2, 2014 at 8:56 PM, Josh Berkus wrote: >>> Yes, it's only intractable if you're wedded to the idea of a tiny, >>> fixed-size sample. If we're allowed to sample, say, 1% of the table, we >>> c

Re: [PERFORM] Yet another abort-early plan disaster on 9.3

2014-10-10 Thread Tomas Vondra
On 10.10.2014 16:21, Craig James wrote: > On Fri, Oct 10, 2014 at 5:10 AM, Tomas Vondra > wrote: > > > I've gone looking for papers on this topic but from what I read this > > isn't so. To get any noticeable improvement you need to read 10-50% of > > the table a

Re: [PERFORM] Yet another abort-early plan disaster on 9.3

2014-10-10 Thread Craig James
On Fri, Oct 10, 2014 at 5:10 AM, Tomas Vondra wrote: > > I've gone looking for papers on this topic but from what I read this > > isn't so. To get any noticeable improvement you need to read 10-50% of > > the table and that's effectively the same as reading the entire table > > -- and it still ha

Re: [PERFORM] Yet another abort-early plan disaster on 9.3

2014-10-10 Thread Tomas Vondra
Dne 10 Říjen 2014, 13:16, Greg Stark napsal(a): > On Thu, Oct 2, 2014 at 8:56 PM, Josh Berkus wrote: >> Yes, it's only intractable if you're wedded to the idea of a tiny, >> fixed-size sample. If we're allowed to sample, say, 1% of the table, we >> can get a MUCH more accurate n_distinct estimate

Re: [PERFORM] Yet another abort-early plan disaster on 9.3

2014-10-10 Thread Greg Stark
On Thu, Oct 2, 2014 at 8:56 PM, Josh Berkus wrote: > Yes, it's only intractable if you're wedded to the idea of a tiny, > fixed-size sample. If we're allowed to sample, say, 1% of the table, we > can get a MUCH more accurate n_distinct estimate using multiple > algorithms, of which HLL is one. W