RE: Re: Dissapearing indexes, what's that all about?

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема RE: Re: Dissapearing indexes, what's that all about?
Дата
Msg-id 01C0BAA8.E9B63B40.mascarm@mascari.com
обсуждение исходный текст
Ответ на Dissapearing indexes, what's that all about?  (Daniel ?erud <zilch@home.se>)
Список pgsql-general
What are the costs associated with the EXPLAIN output? Perhaps a sequential scan is *faster* then an index scan.

Mike Mascari
mascarm@mascari.com

-----Original Message-----
From:    Daniel ?erud [SMTP:zilch@home.se]
Sent:    Sunday, April 01, 2001 12:31 PM
To:    pgsql-general@postgresql.org
Subject:    Re: Re: [GENERAL] Dissapearing indexes, what's that all about?



> >Hey people,
> >have a very strange problem now...
> >It's that when my database with the script i'm using a
> >explain select * from acc where username='britta' yields
an
> >index scan. Very nice. But after some time being up the
> >same thing yields a SEQUENTIAL scan. What's happening
> >folks? =) No more than update's select's and vacuums has
> >been invoked.
>
> Are you doing vacuum or vacuum analyze?  I believe only
the 'vacuum analyze'
> function cleans up the indexing statistics.
>
> len
>

Please look at this:
I just ran an interesting little test here...
watch this:

<DROP DB><CREATE DB><RUN DB SCRIPT>

explain select * from acc where username='britta';

Index scan using acc_username_key on acc...

VACUUM;

explain select * from acc where username='britta';

Seq Scan on acc

<DROP DB><CREATE DB><RUN DB SCRIPT>

explain select * from acc where username='britta';

Index scan

VACUUM ANALYZE

explain select * from acc where username='britta';

Seq scan

What the wakk is goin on here people? =)

version: PostgreSQL 7.0.0 on i686-pc-linux-gnu, compiled by
gcc 2.95.2

Thanks

Daniel Akerud


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


В списке pgsql-general по дате отправления:

Предыдущее
От: "ADBAAMD"
Дата:
Сообщение: Re: SELECT MAX question
Следующее
От: Mike Mascari
Дата:
Сообщение: RE: SELECT MAX question