Skip site navigation (1) Skip section navigation (2)

performance on query

From: Sidar López Cruz <sidarlopez(at)hotmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: performance on query
Date: 2005-10-26 23:47:31
Message-ID: BAY23-F36614886359D96AC48B8BCE690@phx.gbl (view raw or flat)
Thread:
Lists: pgsql-performance
I DON'T KNOW WHAT TO DO WITH THIS QUERYS...
Comparation with sql server, sql server wins !!!


Table sizes:
archivos: 40MB
fotos: 55MB

select count(1) from fotos f where not exists (select a.archivo from 
archivos a where a.archivo=f.archivo)
173713 ms.
110217 ms.
83122 ms.

select count(*) from
(
	select archivo from fotos
	    except
	select archivo from archivos
) x;
201479 ms.

SELECT count(*)
FROM fotos f
LEFT JOIN archivos a USING(archivo)
WHERE a.archivo IS NULL
199523 ms.

_________________________________________________________________
MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/


Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2005-10-26 23:53:02
Subject: Re: Materializing a sequential scan
Previous:From: Steinar H. GundersonDate: 2005-10-26 23:22:19
Subject: Re: Materializing a sequential scan

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group