pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ludovico Magnocavallo <ludo@experian.it>
To: Jackson, DeJuan <djackson@cpsgroup.com>
To: pgsql-general@postgreSQL.org
Cc: PGSQL SQL <pgsql-sql@postgreSQL.org>
Subject: Re: [GENERAL] pqReadData() -- backend closed the channel unexpect edly.
Date: Tue, 9 Feb 1999 22:55:47 +0100
Message-ID: <009001be5476$f6213c80$140aa8c0@deskproludo> (raw)

Thanks again, Jackson, but your query is not right :(
Here is a sample output:

your query:

 SELECT o.origine, sum(o.bytes), sum(d.bytes), '09/02/1999
00:59:59'::datetime
   FROM day o, day d
where o.origine=d.destinazione
and o.origine << '194.74.133.0/24'
and o.when between '09/02/1999 00:00:01' and '09/02/1999 00:59:59'
and d.when between '09/02/1999 00:00:01' and '09/02/1999 00:59:59'
  GROUP BY o.origine,4;

result (only for host 194.74.133.11, query is too long):

 194.74.133.11|18569856|13493249|09/02/1999 00:59:59.00 MET

simple query to check first sum:

SELECT o.origine, sum(o.bytes)
   FROM day o
where o.origine = '194.74.133.11'
and o.when between '09/02/1999 00:00:01' and '09/02/1999 00:59:59'
  GROUP BY o.origine;

194.74.133.11|250944

Huge difference! Moreover, your query is slow, much much slower than two
separate queries. I would have used it though, if it worked. Postgresql
keeps crashing on my loop. :(

Thanks

L.





view thread (6+ messages)  latest in thread

Message-ID: <009001be5476$f6213c80$140aa8c0@deskproludo>
Permalink:  ../009001be5476$f6213c80$140aa8c0@deskproludo/
Also on:    postgresql.org/message-id/009001be5476$f6213c80$140aa8c0@deskproludo

 · 

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: ludo@experian.it, djackson@cpsgroup.com, pgsql-general@postgreSQL.org
  Subject: Re: [GENERAL] pqReadData() -- backend closed the channel unexpect edly.
  In-Reply-To: <009001be5476$f6213c80$140aa8c0@deskproludo>
  References: <009001be5476$f6213c80$140aa8c0@deskproludo>

* 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