pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Diehl, Jeffrey <jdiehl@sandia.gov>
To: 'Haller Christoph' <ch@rodos.fzk.de>
To: Diehl, Jeffrey <jdiehl@sandia.gov>
Cc: pgsql-sql@postgresql.org
Subject: Re: Out of free buffers... HELP!
Date: Wed, 19 Sep 2001 15:00:00 -0600
Message-ID: <B51F0C636E578A4E832D3958690CD73E0130C03E@es04snlnt> (raw)

Ok, can someone explain to me why this first query might run faster than the
second?

select src,dst,count(dst) from data;

select src,dst,count(*) from data;

I've always used the second form.  If the first is faster, I need to know.

Thanx,
Mike Diehl,
Network Monitoring Tool Devl.
Sandia National Laboratories.
(505) 284-3137
jdiehl@sandia.gov

> -----Original Message-----
> From: Haller Christoph [mailto:ch@rodos.fzk.de]
> Sent: September 18, 2001 7:18 AM
> To: jdiehl@sandia.gov
> Cc: pgsql-sql@postgresql.org
> Subject: Re: [SQL] Out of free buffers... HELP!
> 
> 
> As long as there are no nulls allowed in column 'dst' the 
> select src,dst,count(dst) from ... 
> should retrieve the same result. 
> Try it. It should run faster anyway. 
> Maybe there are other ways to word your query, but without 
> more knowledge about your table structure and intentions 
> I can't tell you what. 
> Alternatively, you may want to report your error to the 
> [HACKERS] mailing list - there you might even find more
> detailed support. 
> Regards, Christoph 
> > 
> > Hi all.
> > 
> > I sent this once before, but didn't see it appear on the 
> list...  So here we
> > go again...
> > 
> > I have a large query that I'm trying to run, but it never 
> finishes.  I
> > get an error message and it quits.
> > 
> > I'm doing:
> > 
> > psql ids -c 'select src,dst,count(*) from brick* where src_port=135
> > group by src,dst' > /tmp/135.dat
> > 
> > and I get:
> > 
> > ERROR:  out of free buffers: time to abort !
> > 
> > Any ideas on how to get this query to run?
> > 
> > Thanx,
> > Mike Diehl.
> > 
> > 
> > ---------------------------(end of 
> broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to 
> majordomo@postgresql.org
> > 
> 
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to 
> majordomo@postgresql.org)
> 




view thread (19+ messages)  latest in thread

Message-ID: <B51F0C636E578A4E832D3958690CD73E0130C03E@es04snlnt>
Permalink:  ../B51F0C636E578A4E832D3958690CD73E0130C03E@es04snlnt/
Also on:    postgresql.org/message-id/B51F0C636E578A4E832D3958690CD73E0130C03E@es04snlnt

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: jdiehl@sandia.gov, ch@rodos.fzk.de
  Subject: Re: Out of free buffers... HELP!
  In-Reply-To: <B51F0C636E578A4E832D3958690CD73E0130C03E@es04snlnt>
  References: <B51F0C636E578A4E832D3958690CD73E0130C03E@es04snlnt>

* 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