Re: [SQL] Mail about select - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] Mail about select
Date
Msg-id 16871.928506798@sss.pgh.pa.us
Whole thread Raw
In response to Mail about select  (Vikrant Rathore <vikrant@chemquick.com>)
List pgsql-sql
Vikrant Rathore <vikrant@chemquick.com> writes:
> now i am firing a query like this:

> select r.uname from radius r, radiustemp rt where r.uname<>rt.uname and
> r.logdate<>rt.logdate and r.logtime<>rt.logtime;

> After some time i get  response
> "Segmentation Error"
> core(sumped)

How big are your tables?  That query will probably produce an output
row for almost every combination of a row from radius with a row from
radiustemp, which might overflow the allowed memory for your
application.

I suppose what you really want is to find the rows in radius that do
not have duplicates in radiustemp, but that query won't do it...
        regards, tom lane


pgsql-sql by date:

Previous
From: José Soares
Date:
Subject: Re: [SQL] datetime function
Next
From: Tom Lane
Date:
Subject: Re: [SQL] Slashdot Query