X-Original-To: pgsql-performance@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id B11A192625F for ; Mon, 2 Jun 2003 01:37:59 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 93429-01 for ; Mon, 2 Jun 2003 01:37:49 -0400 (EDT) Received: from ike.local.anstat.com.au (mole.anstat.com.au [202.92.123.11]) by developer.postgresql.org (Postfix) with ESMTP id 53EDC92628F for ; Mon, 2 Jun 2003 01:37:48 -0400 (EDT) Received: by IKE with Internet Mail Service (5.5.2655.55) id ; Mon, 2 Jun 2003 15:35:26 +1000 Message-ID: <7395B46C07F8D51182AE000629570CC4B2E180@IKE> From: Paul Smith To: 'Tom Lane' , George Papastamatopoulos Cc: pgsql-performance@postgresql.org, Paul Smith Subject: Re: FW: Query Plan problem Date: Mon, 2 Jun 2003 15:35:25 +1000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2655.55) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: by amavisd-new X-Archive-Number: 200306/11 X-Sequence-Number: 2095 Thanks Tom for the reply (if you could reply all, as I'm not currently subscribed just yet). [Since our post, we've down an explicit vacuum on the tbluser.id column, and things are looking much much better, there were 0 rows in the pg_stats table for that table...] Incidently, tbluser.Id is a bigint (hence the '' wrapped around the in clause, otherwise the infamous postgres issue crops up not matching the Int literal number with the bigint index, and reverts to nasty table scan). Both our production and our dump/restore servers are UNICODE. Incidently, if I do a VACUUM Analyze on this table: comptoolkit=# VACUUM analyze tbluser; ERROR: Invalid UNICODE character sequence found (0xf8335c) Me thinks somehow there is a hashed_password with some dodgy characters, but I'm not sure how we'll find that row, or what we'll do with that when we find it. (Any thoughts?). Could be why statistics getting removed? ANy thoughts along this would be good, we're over the performance hump, but it's always nice to know more... cheers, Paul Smith > -----Original Message----- > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] > Sent: Monday, 2 June 2003 3:31 PM > To: George Papastamatopoulos > Cc: pgsql-performance@postgresql.org; Paul Smith > Subject: Re: [PERFORM] FW: Query Plan problem > > > George Papastamatopoulos > writes: > >> ... WHERE tblUser.id IN > >> > ('102','103','104','105','106','107','108','109','110','111',' > 112','113',' > >> > 114','115','116','117','118','119','120','121','122','123','12 > 4','125','12 > > ... > > What's the datatype of tblUser.id? What indexes do you have on the > table? > > Also, are both databases built with the same locale/encoding support > and initdb-time choices? What are they? > > regards, tom lane >