pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Help with performance and explain.
2+ messages / 1 participants
[nested] [flat]

* Help with performance and explain.
@ 2006-07-07 19:18 Oisin Glynn <me@oisinglynn.com>
  2006-07-07 21:15 ` Re: Help with performance and explain. Oisin Glynn <me@oisinglynn.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Oisin Glynn @ 2006-07-07 19:18 UTC (permalink / raw)
  To: pgsql-sql

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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Help with performance and explain.
  2006-07-07 19:18 Help with performance and explain. Oisin Glynn <me@oisinglynn.com>
@ 2006-07-07 21:15 ` Oisin Glynn <me@oisinglynn.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Oisin Glynn @ 2006-07-07 21:15 UTC (permalink / raw)
  To: Oisin Glynn <me@oisinglynn.com>; +Cc: pgsql-sql

Oisin Glynn wrote:
> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faq

I decided to Import a dump into the same server that was displaying the 
slow response and it was fine on the second database.... Explain below. 
So I am even more puzzled but I guess my immediate issue is over.   I 
had vacuumed and analyzed this pre dumping to no avail on the initial db.

"Sort  (cost=31284.82..31576.38 rows=116622 width=234)"
"  Sort Key: service"
"  ->  Seq Scan on callrecord  (cost=0.00..3605.22 rows=116622 width=234)"

Oisin




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-07-07 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-07-07 19:18 Help with performance and explain. Oisin Glynn <me@oisinglynn.com>
2006-07-07 21:15 ` Oisin Glynn <me@oisinglynn.com>

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