Re: [GENERAL] slow pgsql tables - need to vacuum?

2008-04-10 Thread Dan99
On Apr 7, 11:14 am, [EMAIL PROTECTED] (Alan Hodgson) wrote: > On Monday 07 April 2008, Dan99 <[EMAIL PROTECTED]> wrote: > > > Does TRUNCATE TABLE keep all necessary table > > information such as indexes, constraints, triggers, rules, and > > privileges? > > Yes. It does require an exclusive lock on

Re: [GENERAL] slow pgsql tables - need to vacuum?

2008-04-07 Thread Alan Hodgson
On Monday 07 April 2008, Dan99 <[EMAIL PROTECTED]> wrote: > Does TRUNCATE TABLE keep all necessary table > information such as indexes, constraints, triggers, rules, and > privileges? Yes. It does require an exclusive lock on the table very briefly, though, which DELETE does not. > Currently a m

Re: [GENERAL] slow pgsql tables - need to vacuum?

2008-04-07 Thread Douglas McNaught
On Mon, Apr 7, 2008 at 9:51 AM, Dan99 <[EMAIL PROTECTED]> wrote: > Unfortunately, I did not design this database (or the website for that > matter) and am only maintaining it. As a result of the inexperience > of the website designer, there are no indexes in any of the tables and > it would b

Re: [GENERAL] slow pgsql tables - need to vacuum?

2008-04-07 Thread Dan99
On Apr 5, 6:36 pm, [EMAIL PROTECTED] ("Douglas McNaught") wrote: > On Thu, Apr 3, 2008 at 2:34 PM, Dan99 <[EMAIL PROTECTED]> wrote: > > Hi, > > > I am having some troubles with a select group of tables in a database > > which are acting unacceptably slow. For example a table with > > approximat

Re: [GENERAL] slow pgsql tables - need to vacuum?

2008-04-06 Thread Gregory Stark
"Craig Ringer" <[EMAIL PROTECTED]> writes: > Douglas McNaught wrote: > >> You need to ANALYZE the tables after you load them, and make sure you >> have indexes on the column you're querying (which it sounds like you >> do, but they're not being used because the statistics for the table >> are inac

Re: [GENERAL] slow pgsql tables - need to vacuum?

2008-04-06 Thread Craig Ringer
Douglas McNaught wrote: > You need to ANALYZE the tables after you load them, and make sure you > have indexes on the column you're querying (which it sounds like you > do, but they're not being used because the statistics for the table > are inaccurate). I've seen discussion here that made it so

Re: [GENERAL] slow pgsql tables - need to vacuum?

2008-04-05 Thread Douglas McNaught
On Thu, Apr 3, 2008 at 2:34 PM, Dan99 <[EMAIL PROTECTED]> wrote: > Hi, > > I am having some troubles with a select group of tables in a database > which are acting unacceptably slow. For example a table with > approximately < 10,000 rows took about 3,500ms to extract a single row > using the f

[GENERAL] slow pgsql tables - need to vacuum?

2008-04-05 Thread Dan99
Hi, I am having some troubles with a select group of tables in a database which are acting unacceptably slow. For example a table with approximately < 10,000 rows took about 3,500ms to extract a single row using the following select statement: SELECT * FROM table WHERE column = 'value' I have p