Re: [PERFORM] Fast distinct not working as expected

2014-04-17 Thread Jeff Janes
On Thu, Apr 17, 2014 at 10:17 AM, Franck Routier wrote: > > > My best guess would be that the index got stuffed full of entries for > rows that are not visible, either because they are not yet committed, or > have been deleted but are not yet vacuumable. Do you have any long-lived > transactions

Re: [PERFORM] Fast distinct not working as expected

2014-04-17 Thread Franck Routier
Hi, > > That is not equivalent to a distinct. There must be more to it than that. Indeed, this query is used in a loop: CREATE OR REPLACE FUNCTION small_distinct(IN tablename character varying, IN fieldname character varying, IN sample anyelement DEFAULT ''::character varying) RETURNS SETOF any

Re: [PERFORM] Fast distinct not working as expected

2014-04-17 Thread Jeff Janes
On Thu, Apr 17, 2014 at 8:11 AM, Franck Routier wrote: > Hi, > > we are using a mono-column index on a huge table to try to make a quick > 'select distinct ' on the column. > > This used to work fine, but... it does not anymore. We don't know what > happened. > > Here are the facts: > > - request:

[PERFORM] Fast distinct not working as expected

2014-04-17 Thread Franck Routier
Hi, we are using a mono-column index on a huge table to try to make a quick 'select distinct ' on the column. This used to work fine, but... it does not anymore. We don't know what happened. Here are the facts: - request: SELECT dwhinv___rfovsnide::varchar FROM dwhinv WHERE dwhinv___rfovsnide

Re: [PERFORM] Workaround for working_mem max value in windows?

2014-04-17 Thread amul sul
On Wednesday, 16 April 2014 10:05 PM, Nick Eubank wrote: >Amul: thanks for the followup! Unfortunately, setting locally faces the same >limitation  >as setting things in the config file --  >I get an "ERROR: 3072000 is outside the valid range for parameter "work_mem" >(64 .. 2097151) >SQL st