Re: [GENERAL] select DISTINCT

2013-09-09 Thread pg noob
Thank you Kevin and Jeff for the responses. These are very helpful. On Fri, Sep 6, 2013 at 10:48 PM, Jeff Janes wrote: > On Friday, September 6, 2013, pg noob wrote: > >> >> Hi all, >> >> I'm curious about some of the query estimates that I'm seeing wi

[GENERAL] select DISTINCT

2013-09-06 Thread pg noob
Hi all, I'm curious about some of the query estimates that I'm seeing with queries that use DISTINCT. I am using postgres 8.4.13 I did a couple of quick tests, and found that PostgreSQL seems to do some expensive work to return DISTINCT rows. This is contrary to what I was expecting because I ex

[GENERAL] postgres 9.2

2013-08-28 Thread pg noob
Hi all, I recently ran a couple of tests where I took one of my production systems and did a drop-in replacement of postgres 8.4 with 9.2.4. I was expecting to see some performance improvement given the release notes describing 9.2 as a "largely performance related release". At least for my appli

[GENERAL] unique index corruption

2013-07-24 Thread pg noob
Hi all, In PostgreSQL 8.4... I am wondering if autovacuum will periodically rebuild indexes? If not, how advisable is it to reindex periodically? We recently had a case of unique index corruption which ended up allowing duplicate primary key IDs to get inserted and caused widespread data model

Fwd: [GENERAL] odd locking behaviour

2013-07-23 Thread pg noob
9.3, please, where RI uses more gently locks > > It still behaves this way in 9.4dev. > > >> > >> On Mon, Jul 8, 2013 at 9:54 AM, pg noob wrote: > >>> > >>> > >>> Thank you for the responses. Is it a bug? > > I don't think s

Re: [GENERAL] odd locking behaviour

2013-07-08 Thread pg noob
40 AM, Moshe Jacobson wrote: > Confirmed reproducible on version 9.1 as well. Very odd. > > > On Wed, Jul 3, 2013 at 1:30 PM, pg noob wrote: > >> >> Hi all, >> >> I am trying to understand some odd locking behaviour. >> I apologize in advance if this is a

[GENERAL] odd locking behaviour

2013-07-03 Thread pg noob
Hi all, I am trying to understand some odd locking behaviour. I apologize in advance if this is a basic question and should be widely understood but I don't see it described in the documentation as far as I could find. I'm using Postgres 8.4.13 I have two tables, call them A & B for example purp

Re: [GENERAL] unique constraint violations

2013-06-26 Thread pg noob
un 26, 2013, at 11:04 AM, pg noob wrote: > > > > > Hi all, > > > > There are some places in our application where unique constraint > violations are difficult to avoid due to multithreading. > > What we've done in most places to handle this is to retry in

[GENERAL] unique constraint violations

2013-06-26 Thread pg noob
Hi all, There are some places in our application where unique constraint violations are difficult to avoid due to multithreading. What we've done in most places to handle this is to retry in a loop. Generally it starts by checking if a value already exists, if not - try to insert it, which may ca