query takes a long time - Mailing list pgsql-general

From Garry Saddington
Subject query takes a long time
Date
Msg-id 200808232051.51544.garry@schoolteachers.co.uk
Whole thread Raw
Responses Re: query takes a long time  ("marcin mank" <marcin.mank@gmail.com>)
List pgsql-general

Can someone suggest how I could speed up the execution of this query?

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'))

It returns the correct results but very slowly.

regards

garry

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: psql vs. pgadmin3 was:can't get UPDATE ... RETURNING ... INTO ... to compile successfully
Next
From: Marc Balmer
Date:
Subject: Re: psql vs. pgadmin3 was:can't get UPDATE ... RETURNING ... INTO ... to compile successfully