Re: query takes a long time

From: "marcin mank" <marcin(dot)mank(at)gmail(dot)com>
To: "Garry Saddington" <garry(at)schoolteachers(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: query takes a long time
Date: 2008-08-23 22:07:24
Message-ID: b1b9fac60808231507y1c68ed21o7f1fbfa2b4e51a21@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> select count(distinct attendance.studentid)
>
> from attendance
>
> where attendance.studentid not in (select studentid from attendance where
> auth not in('C','E','F','G','H','I','M','N','O','R','S','T','U'))
>
>
I am tired a lot now, but isn`t it the same as:

select count(distinct attendance.studentid)

from attendance

where auth in('C','E','F','G','H','I','M','N','O','R','S','T','U')

?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2008-08-24 11:37:11 Re: on delete cascade slowing down delete
Previous Message Raymond O'Donnell 2008-08-23 21:06:18 Re: psql vs. pgadmin3 was:can't get UPDATE ... RETURNING ... INTO ... to compile successfully