pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oisin Glynn <me@oisinglynn.com>
To: pgsql-sql@postgresql.org
Subject: Help with performance and explain.
Date: Fri, 07 Jul 2006 15:18:13 -0400
Message-ID: <44AEB375.9070804@oisinglynn.com> (raw)

I have an issue with a select returning very slowly  approx 198 seconds. 
I took a backup of this DB and restored it on another system and it is 
returning in 28 seconds.

Windows 2000  PG Version 8.0.3  Data is inserted into the table row by row.
Table has index on service
explain SELECT
    callrecord."service", callrecord."timequeuing", 
callrecord."timeconversation", callrecord."timeoffering", 
callrecord."calltype", callrecord."application"
FROM
    "public"."callrecord" callrecord
ORDER BY
    callrecord."service" ASC

"Sort  (cost=284032.83..284322.17 rows=115734 width=46)"
"  Sort Key: service"
"  ->  Seq Scan on callrecord  (cost=0.00..270144.34 rows=115734 width=46)"


Windows 2000 Version 8.0.1  DB created from backup of other server.
explain SELECT
    callrecord."service", callrecord."timequeuing", 
callrecord."timeconversation", callrecord."timeoffering", 
callrecord."calltype", callrecord."application"
FROM
    "public"."callrecord" callrecord
ORDER BY
    callrecord."service" ASC
"Sort  (cost=17465.33..17754.65 rows=115729 width=46)"
"  Sort Key: service"
"  ->  Seq Scan on callrecord  (cost=0.00..3577.29 rows=115729 width=46)"

Any help would be greatly appreciated.

Oisin




view thread (2+ messages)  latest in thread

Message-ID: <44AEB375.9070804@oisinglynn.com>
Permalink:  ../44AEB375.9070804@oisinglynn.com/
Also on:    postgresql.org/message-id/44AEB375.9070804@oisinglynn.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-sql@postgresql.org
  Cc: me@oisinglynn.com
  Subject: Re: Help with performance and explain.
  In-Reply-To: <44AEB375.9070804@oisinglynn.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