Unix Technical Forum

zero performance on query

This is a discussion on zero performance on query within the Pgsql Performance forums, part of the PostgreSQL category; --> what happend with postgresql 8.1b4 performance on query? please help me !!! look at this: select count(*) from fotos ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 12:36 PM
=?iso-8859-1?B?U2lkYXIgTPNwZXogQ3J1eg==?=
 
Posts: n/a
Default zero performance on query

what happend with postgresql 8.1b4 performance on query?
please help me !!!

look at this:
select count(*) from fotos where archivo not in (select archivo from
archivos)
Aggregate (cost=4899037992.36..4899037992.37 rows=1 width=0)
-> Seq Scan on fotos (cost=22598.78..4899037338.07 rows=261716 width=0)
Filter: (NOT (subplan))
SubPlan
-> Materialize (cost=22598.78..39304.22 rows=805344 width=58)
-> Seq Scan on archivos (cost=0.00..13141.44 rows=805344
width=58)

I WILL DIE WAITING FOR QUERY RESPONSE !!!
--
CREATE TABLE archivos ( archivo varchar(20)) WITHOUT OIDS;
CREATE INDEX archivos_archivo_idx ON archivos USING btree(archivo);
~800000 rows
--
CREATE TABLE fotos
(
cedula varchar(20),
nombre varchar(100),
apellido1 varchar(100),
apellido2 varchar(100),
archivo varchar(20)
) WITHOUT OIDS;
CREATE INDEX fotos_archivo_idx ON fotos USING btree (archivo);
CREATE INDEX fotos_cedula_idx ON fotos USING btree (cedula);
~500000 rows

__________________________________________________ _______________
Consigue aquí las mejores y mas recientes ofertas de trabajo en América
Latina y USA: http://latam.msn.com/empleos/


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 12:36 PM
Steinar H. Gunderson
 
Posts: n/a
Default Re: zero performance on query

On Tue, Oct 25, 2005 at 10:26:43PM -0600, Sidar López Cruz wrote:
> look at this:
> select count(*) from fotos where archivo not in (select archivo from
> archivos)
> Aggregate (cost=4899037992.36..4899037992.37 rows=1 width=0)
> -> Seq Scan on fotos (cost=22598.78..4899037338.07 rows=261716 width=0)
> Filter: (NOT (subplan))
> SubPlan
> -> Materialize (cost=22598.78..39304.22 rows=805344 width=58)
> -> Seq Scan on archivos (cost=0.00..13141.44 rows=805344
> width=58)


Now, this is interesting; it seems to trigger exactly the same oddity as my
query did (at least one of them; the materialized sequential scan).

/* Steinar */
--
Homepage: http://www.sesse.net/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com