Re: Fwd: Tweaking PG (again) - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Fwd: Tweaking PG (again)
Date
Msg-id 20081113235831.GL4062@alvh.no-ip.org
Whole thread Raw
In response to Fwd: Tweaking PG (again)  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
List pgsql-general
Phoenix Kiula escribió:

> >> ----------------------------------------------------------------------------------------------------------------
> >> Index Scan using new_idx_books_userid on books  (cost=0.00..493427.14
> >> rows=2 width=31) (actual time=0.428..8400.299 rows=1 loops=1)
> >>   Index Cond: ((user_id)::text = 'MYUSER'::text)
> >>   Filter: (url_encrypted = 'bed59c2f2d92e306d4481a276bd8a78c4b0532d4'::bpchar)
> >>  Total runtime: 8400.349 ms
> >> (4 rows)
> >
> > 8.4 seconds is a very long time to spend looking up a single record.
> > Is this table bloated?  What does
> >
> > vacuum verbose books;

> Thanks but this table "books" has autovac on, and it's manually
> vacuumed every hour!

Perhaps try reindexing it.  What kind of index is new_idx_books_userid
anyway?  btree?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-general by date:

Previous
From: "Dan Armbrust"
Date:
Subject: vacuum output question
Next
From: "Eric Jain"
Date:
Subject: Granting read-only access to an existing database?