Re: performance on query

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: performance on query
Дата
Msg-id 20051027030013.GE16682@pervasive.com
обсуждение исходный текст
Ответ на performance on query  (Sidar López Cruz <sidarlopez@hotmail.com>)
Список pgsql-performance
So the issue is that instead of taking 174 seconds the query now takes
201?

I'm guessing that SQL server might be using index covering, but that's
just a guess. Posting query plans (prefferably with actual timing info;
EXPLAIN ANALYZE on PostgreSQL and whatever the equivalent would be for
MSSQL) might give us some idea.

On Wed, Oct 26, 2005 at 05:47:31PM -0600, Sidar L?pez Cruz wrote:
> 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/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

В списке pgsql-performance по дате отправления:

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: browsing table with 2 million records
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Perfomance of views