Re: MSSQL versus Postgres timing - Mailing list pgsql-sql

From Tom Lane
Subject Re: MSSQL versus Postgres timing
Date
Msg-id 19308.1107294803@sss.pgh.pa.us
Whole thread Raw
In response to Re: MSSQL versus Postgres timing  ("Joel Fradkin" <jfradkin@wazagua.com>)
Responses Re: MSSQL versus Postgres timing  ("Joel Fradkin" <jfradkin@wazagua.com>)
List pgsql-sql
"Joel Fradkin" <jfradkin@wazagua.com> writes:
> "              ->  Sort  (cost=38119.24..38333.26 rows=85611 width=52) (actual time=20667.645..21031.627 rows=99139
loops=1)"
> "                    Sort Key: (a.clientnum)::text, a.jobtitleid"
> "                    ->  Seq Scan on tblassociate a  (cost=0.00..31105.34 rows=85611 width=52) (actual
time=14.768..16024.395rows=99139 loops=1)"
 
> "                          Filter: ((clientnum)::text = 'SAKS'::text)"

The sort steps seem slower than they ought to be.  I suspect you ought
to raise sort_mem ... try 10MB instead of 1MB.  Also, if you are running
in a locale other than C and don't have a good reason for doing so, it
would be worth trying C locale instead.

The results with enable_seqscan off also suggest that random_page_cost
may be too high for your environment.

BTW, the schema you posted does not match these plans --- there are
indexes referenced in the plans that do not appear in the schema.
        regards, tom lane


pgsql-sql by date:

Previous
From: PFC
Date:
Subject: Re: MSSQL versus Postgres timing
Next
From: "Joel Fradkin"
Date:
Subject: Re: MSSQL versus Postgres timing