pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Heiko Kehlenbrink <Heiko.Kehlenbrink@vermes.fh-oldenburg.de>
To: pgsql-performance@postgresql.org
Subject: Re: performance comparission postgresql/ms-sql server
Date: Mon, 5 Apr 2004 08:52:51 -0700
Message-ID: <200404050852.51709.josh@agliodbs.com> (raw)
In-Reply-To: <48932.195.243.253.146.1081179099.squirrel@webmail.fh-oldenburg.de>
References: <48932.195.243.253.146.1081179099.squirrel@webmail.fh-oldenburg.de>

Heiko,

> 100.000 from 50.000.000:
>
> postgres: 0.88 sec
> ms-sql: 0.38 sec
>
> 200.000 from 50.000.000:
>
> postgres: 1.57 sec
> ms-sql: 0.54 sec
>
> 500.000 from 50.000.000:
>
> postgres: 3.66 sec
> ms-sql: 1.18 sec

Questions:

1. Is this the time to return *all rows* or just the first row?   Given the 
different way that PostgreSQL fetches rows to the client from MSSQL, it makes 
a difference.

2. What are your sort-mem and shared-mem settings?

3. Have you tried clustering the table?

4. Have you done a comparison of selecting random or scattered, instead of 
serial rows?   MSSQL has a tendency to physically store rows in "order" which 
gives it a certain advantage in this kind of query.


-- 
Josh Berkus
Aglio Database Solutions
San Francisco



view thread (9+ messages)  latest in thread

Message-ID: <200404050852.51709.josh@agliodbs.com>
Permalink:  ../200404050852.51709.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200404050852.51709.josh@agliodbs.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: josh@agliodbs.com, Heiko.Kehlenbrink@vermes.fh-oldenburg.de
  Subject: Re: performance comparission postgresql/ms-sql server
  In-Reply-To: <200404050852.51709.josh@agliodbs.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