pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marcin Stępnicki <mstepnicki@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: DISTINCT ON not working...?
Date: Tue, 20 Feb 2007 13:33:55 +0100
Message-ID: <pan.2007.02.20.12.33.55.976823@gmail.com> (raw)
References: <19666.1171945956@sss.pgh.pa.us>
	<00e601c754a8$b2428010$9b0014ac@wbaus090>

Dnia Tue, 20 Feb 2007 15:36:32 +1100, Phillip Smith napisał(a):

> Removing the CASE statement all together:
> SELECT  DISTINCT ON (ean)
> 	  ean,
> 	  count(*)
> FROM    TMPTABLE
> WHERE   code NOT IN (SELECT code FROM stock_deleted)
>  AND    ean IS NOT NULL
> GROUP BY ean
> 
> Still gives me:
> 	3246576919422	2

Wild guess - have you tried reindexing this table? I haven't seen
corrupted indexes since 7.1, though - it usually means subtle hardware
problems.

-- 
| And Do What You Will be the challenge | http://apcoln.linuxpl.org
|    So be it in love that harms none   | http://biznes.linux.pl
|   For this is the only commandment.   | http://www.juanperon.info
`---*  JID: Aragorn_Vime@jabber.org *---' http://www.naszedzieci.org 





view thread (5+ messages)  latest in thread

Message-ID: <pan.2007.02.20.12.33.55.976823@gmail.com>
Permalink:  ../pan.2007.02.20.12.33.55.976823@gmail.com/
Also on:    postgresql.org/message-id/pan.2007.02.20.12.33.55.976823@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mstepnicki@gmail.com
  Subject: Re: DISTINCT ON not working...?
  In-Reply-To: <pan.2007.02.20.12.33.55.976823@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox