[PERFORM] fast DISTINCT or EXIST

2007-04-07 Thread Tilo Buschmann
Hello, I am trying to build a application to search CDs and their tracks and I am experiencing some performance difficulties. The database is very simple at the moment, two tables cd and tracks contain the CD-information and their respective tracks. A column cd_id in public.tracks is the foreign

Re: [PERFORM] fast DISTINCT or EXIST

2007-04-07 Thread Tilo Buschmann
Hi everyone, On Sat, 07 Apr 2007 11:54:08 -0400 Tom Lane [EMAIL PROTECTED] wrote: Arjen van der Meijden [EMAIL PROTECTED] writes: If that is your main culprit, you could also use two limits based on the fact that there will be at most X songs per cd which would match your title (my not