pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: amol <amol@mithi.com>
To: pgsql-performance@postgresql.org
Subject: Re: nested select query failing
Date: Wed, 21 May 2003 15:46:00 +0530
Message-ID: <000a01c31f81$fa45da70$2e00a8c0@amol> (raw)
References: <20030515075032.B60859-100000@megazone23.bigpanda.com>
	<00a101c31ea1$19e03d80$2e00a8c0@amol>
	<29058.1053443906@sss.pgh.pa.us>

Hi Tom,
U are great. As you have said, one item was numeric and another serial
 integer ) so it was applying seq scan. Thank you very much for your help
everybody.

regards,
Amol

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "amol" <amol@mithi.com>
Cc: <pgsql-performance@postgresql.org>
Sent: Tuesday, May 20, 2003 8:48 PM
Subject: Re: [PERFORM] nested select query failing


> "amol" <amol@mithi.com> writes:
> > explain analyze select attached_info.id from attached_tag_list,
> > attached_info
> > where
> >          attached_tag_list.attached_tag = 265
> >          and
> >          attached_tag_list.id = attached_info.id
>
> > NOTICE:  QUERY PLAN:
>
> > Nested Loop  (cost=0.00..165349.50 rows=114 width=16) (actual
> > time=117.14..8994.60 rows=15 loops=1)
> >   ->  Index Scan using ix_attached_tag_list_id on attached_tag_list
> > (cost=0.00..111.13 rows=96 width=12) (actual time=0.12..0.66 rows=15
> > loops=1)
> >   ->  Seq Scan on attached_info  (cost=0.00..1211.53 rows=33553 width=4)
> > (actual time=3.67..197.98 rows=33553 loops=15)
> > Total runtime: 8994.92 msec
>
> > - I have already indexed attached_info on id using following query
> > CREATE  INDEX attached_info_Index_1 ON attached_info(id) ;
>
> Hm.  I'd have expected an index scan too.  Maybe the two id columns are
> not of the same datatype?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>




view thread (8+ messages)

Message-ID: <000a01c31f81$fa45da70$2e00a8c0@amol>
Permalink:  ../000a01c31f81$fa45da70$2e00a8c0@amol/
Also on:    postgresql.org/message-id/000a01c31f81$fa45da70$2e00a8c0@amol

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: amol@mithi.com
  Subject: Re: nested select query failing
  In-Reply-To: <000a01c31f81$fa45da70$2e00a8c0@amol>
  References: <20030515075032.B60859-100000@megazone23.bigpanda.com> <00a101c31ea1$19e03d80$2e00a8c0@amol> <29058.1053443906@sss.pgh.pa.us> <000a01c31f81$fa45da70$2e00a8c0@amol>

* 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