Re: planer en delire !!!

From: Daniel <daniel(at)12move(dot)be>
To: pgsql fr <pgsql-fr-generale(at)postgresql(dot)org>
Subject: Re: planer en delire !!!
Date: 2003-08-28 22:30:32
Message-ID: 3F4E8288.6000401@12move.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-fr-generale

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Patrick Welche wrote:<br>
<blockquote type="cite"
cite="mid20030828193356(dot)G8899(at)quartz(dot)newn(dot)cam(dot)ac(dot)uk">
<pre wrap="">On Wed, Aug 27, 2003 at 04:03:51PM +0200, Daniel wrote:
...
</pre>
<blockquote type="cite">
<pre wrap="">j'ai une table matable(serie serial,a int,b, int c int,d int,e int,f
int)(&gt;5000000 de lignes), index unique sur (serie) + index unique sur
(a,b,c,d,e,f) et index sur (a)
</pre>
</blockquote>
<pre wrap=""><!---->..
Repondant a cote: il me semble que l'index sur (a) n'est pas necessaire,
celui sur (a,b,c,d,e,f) devrait etre utilise.. (C'est de memoire)

Patrick

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

</pre>
</blockquote>
je sais avec la version 7.2.1 que j'avais avant , cela fonctionnais comme
sa, il utilisait l'index (a,b,c,d,e,f).<br>
un autre probleme si je fais un index sur une autre colonne (e) et que je
fais un explain analyze select * from combinaison_bis where e=38, si je force
l'utilisation d'un index les resultats sont tres mauvais !!!!!<br>
set enable_seqscan=true;<br>
SET<br>
explain analyze select * from combinaison_bis where e=38;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QUERY PLAN<br>
---------------------------------------------------------------------------------------------------------------------------<br>
&nbsp;Seq Scan on combinaison_bis&nbsp; (cost=0.00..104144.40 rows=278027 width=28)
(actual time=0.09..21532.63 rows=264180 loops=1)<br>
&nbsp;&nbsp; Filter: (e = 38)<br>
<u>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&nbsp; Total runtime: 21720.69
msec &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</u><br>
(3 rows)<br>
<br>
set enable_seqscan=false;<br>
SET<br>
&nbsp;explain analyze select * from combinaison_bis where e=38;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QUERY<br>
PLAN<br>
------------------------------------------------------------------------------<br>
----------------------------------------------------------------------------<br>
&nbsp;Index Scan using e_combinaison_bis_key on combinaison_bis&nbsp; (cost=0.00..8880.05
rows=278027 width=28) (actual time=78.33..159628.99 rows=264180 loops=1)<br>
&nbsp;&nbsp; Index Cond: (e = 38)<br>
<u>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&nbsp; Total runtime:
159843.76 msec &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</u><br>
(3 rows)<br>
<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 3.2 KB

In response to

Browse pgsql-fr-generale by date

  From Date Subject
Next Message m 2003-08-29 10:20:31 Re: [pgsql-fr-generale] Présentations
Previous Message Peter Eisentraut 2003-08-28 20:16:17 Re: planer en delire !!!