Thread: Re: Index Backward Scan fast / Index Scan slow ! (Modifié par Pailloncy Jean-Gérard)
Re: Index Backward Scan fast / Index Scan slow ! (Modifié par Pailloncy Jean-Gérard)
From
Pailloncy Jean-Gérard
Date:
Hi, > In 7.4 a VACUUM should be sufficient ... or at least, if it isn't Atfer VACUUM: dps=# explain analyze select next_index_time from url order by next_index_time desc limit 1; QUERY PLAN ------------------------------------------------------------------------ ------------------------------------------------------------------------ -- Limit (cost=0.00..2.62 rows=1 width=4) (actual time=0.098..0.099 rows=1 loops=1) -> Index Scan Backward using url_next_index_time on url (cost=0.00..814591.03 rows=310913 width=4) (actual time=0.096..0.096 rows=1 loops=1) Total runtime: 0.195 ms (3 rows) dps=# explain analyze select next_index_time from url order by next_index_time asc limit 1; QUERY PLAN ------------------------------------------------------------------------ ------------------------------------------------------------------------ - Limit (cost=0.00..2.62 rows=1 width=4) (actual time=13504.105..13504.106 rows=1 loops=1) -> Index Scan using url_next_index_time on url (cost=0.00..814591.03 rows=310913 width=4) (actual time=13504.099..13504.099 rows=1 loops=1) Total runtime: 13504.158 ms (3 rows) Better, but...... Cordialement, Jean-Gérard Pailloncy
Re: Re: Index Backward Scan fast / Index Scan slow ! (Modifié par Pailloncy Jean-Gérard)
From
Tom Lane
Date:
=?ISO-8859-1?Q?Pailloncy_Jean-G=E9rard?= <pailloncy@ifrance.com> writes: >> In 7.4 a VACUUM should be sufficient ... or at least, if it isn't > Atfer VACUUM: > Better, but...... ... but not much :-(. Okay, could we see VACUUM VERBOSE results for this table? regards, tom lane