pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tv@fuzzy.cz
To: Humair Mohammed <humairm@hotmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query Performance SQL Server vs. Postgresql
Date: Sun, 21 Nov 2010 16:42:07 +0100
Message-ID: <1cc426dab35a9fc3fd189d5f9a6fb7a0.squirrel@sq.gransy.com> (raw)
In-Reply-To: <ef40ef98515c88b82f63c7d6cc421f12.squirrel@sq.gransy.com>
References: <COL115-W5250BF8BDC50E0A64DABE4A8360@phx.gbl>
	<AANLkTin+MPhrYUzkCZjdAMLhF3KKZCCuvDm0=Npf9jz7@mail.gmail.com>
	<COL115-W3987D9D7DE908C5C47792DA8380@phx.gbl>
	<AANLkTi=yFV69yNZpHzKiZRtZ0X0PtKcpOrMNNkAo+Si6@mail.gmail.com>
	<COL115-W186A7B93051E6907958ED6A8380@phx.gbl>
	<AANLkTinQmaQ5Ui-vQwfqWFtOTCj76NWFBr6VDKMdVUCs@mail.gmail.com>
	<COL115-W5263E5369E2BD0B28E78B9A83C0@phx.gbl>
	<ef40ef98515c88b82f63c7d6cc421f12.squirrel@sq.gransy.com>

>> 4) INDEXESI can certainly add an index but given the table sizes I am
>> not
>> sure if that is a factor. This by no means is a large dataset less than
>> 350,000 rows in total and 3 columns. Also this was just a quick dump of
>> data for comparison purpose. When I saw the poor performance on the
>> COALESCE, I pointed the data load to SQL Server and ran the same query
>> except with the TSQL specific ISNULL function.
>
> 350000 rows definitely is a lot of rows, although with 3 INT column it's
> just about 13MB of data (including overhead). But indexes can be quite
> handy when doing joins, as in this case.

OK, I've just realized the tables have 3 character columns, not integers.
In that case the tables are probably much bigger (and there are things
like TOAST). In that case indexes may be even more important.

Tomas




view thread (28+ messages)  latest in thread

Message-ID: <1cc426dab35a9fc3fd189d5f9a6fb7a0.squirrel@sq.gransy.com>
Permalink:  ../1cc426dab35a9fc3fd189d5f9a6fb7a0.squirrel@sq.gransy.com/
Also on:    postgresql.org/message-id/1cc426dab35a9fc3fd189d5f9a6fb7a0.squirrel@sq.gransy.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tv@fuzzy.cz, humairm@hotmail.com
  Subject: Re: Query Performance SQL Server vs. Postgresql
  In-Reply-To: <1cc426dab35a9fc3fd189d5f9a6fb7a0.squirrel@sq.gransy.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox