Skip site navigation (1) Skip section navigation (2)

Re: [PERFORM] Wrong plan or what ?

From: "Mendola Gaetano" <mendola(at)bigfoot(dot)com>
To: <josh(at)agliodbs(dot)com>, <pgsql-performance(at)postgresql(dot)org>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: [PERFORM] Wrong plan or what ?
Date: 2003-07-22 17:48:20
Message-ID: 00ee01c35079$707a6440$152aa8c0@GMENDOLA2 (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-performance
"Josh Berkus" <josh(at)agliodbs(dot)com>
> Gaetano,
>
> > SELECT * from user_logs where id_user in (
> >  10943,   10942,   10934,   10927,   10910,  10909
> > );
> > [SNIPPED]
>
> > Why the planner or the executor ( I don't know ) do not follow
> > the same strategy ?
>
> It is, actually, according to the query plan.
>
> Can you post the EXPLAIN ANALYZE for the above query?

Index Scan using idx_user_user_logs, idx_user_user_logs, idx_user_user_logs,
idx_user_user_logs, idx_user_user_logs, idx_user_user_logs on user_logs
(cost=0.00..5454.21 rows=2498 width=48) (actual time=0.09..0.28 rows=10
loops=1)
   Index Cond: ((id_user = 10943) OR (id_user = 10942) OR (id_user = 10934)
OR (id_user = 10927) OR (id_user = 10910) OR (id_user = 10909))
 Total runtime: 0.41 msec
(3 rows)


Thank you
Gaetano


PS: if I execute the query I obtain 10 rows instead of 3 that say the
explain analyze.




In response to

pgsql-performance by date

Next:From: Jord TannerDate: 2003-07-22 17:54:24
Subject: Re: Dual Xeon + HW RAID question
Previous:From: Josh BerkusDate: 2003-07-22 17:40:28
Subject: Re: [PERFORM] Wrong plan or what ?

pgsql-admin by date

Next:From: Josh BerkusDate: 2003-07-22 17:56:14
Subject: Re: Wrong plan or what ?
Previous:From: Josh BerkusDate: 2003-07-22 17:40:28
Subject: Re: [PERFORM] Wrong plan or what ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group