SELECT "bug"? - Mailing list pgsql-bugs

From The Hermit Hacker
Subject SELECT "bug"?
Date
Msg-id Pine.BSF.4.21.0001211513550.23487-100000@thelab.hub.org
Whole thread Raw
Responses Re: [BUGS] SELECT "bug"?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [BUGS] SELECT "bug"?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I figure that its here, should really start using it... the list that is
...

Okay, playing with a v6.5.3 server right now, and trying something that I
would have guessed would be relatively simple:

webcounter=> select count(1) from webhit_details_formatted;
count
-----
    1
(1 row)

webcounter=> select count(1) from webhit_details_formatted where counter_id = 1;
^C
CANCEL request sent
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
We have lost the connection to the backend, so further processing is impossible.  Terminating.
abacus>

The table have zero data in it ... when I did the WHERE clause above, the
query just hung there until I hit ^C ...

Under Oracle, doing the "SELECT count(1)..." is faster then doing "SELECT
count(*)..." (supposedly), since it doesn't have to retrieve all the
information, only count how many records match the WHERE clause ...

Comments?

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org

pgsql-bugs by date:

Previous
From: Gunnar R|nning
Date:
Subject: Syntax bug in create table - does not allow NULL
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] SELECT "bug"?