[GENERAL] Is there a way to check which indexes are being used for a table

2006-02-23 Thread Dragan Matic
We have a 50 GB database (currently using postgresql 8.1.1) with a few hundred tables. There are a few larger (2-5 million rows) tables with multiple indexes on them, some being unique, some not. Now, I am pretty sure some of the indexes are pretty useless and are never used but is there a way

Re: [GENERAL] Is there a way to check which indexes are being used

2006-02-23 Thread Ragnar
On fim, 2006-02-23 at 14:15 +0100, Dragan Matic wrote: We have a 50 GB database (currently using postgresql 8.1.1) with a few hundred tables. There are a few larger (2-5 million rows) tables with multiple indexes on them, some being unique, some not. Now, I am pretty sure some of the

Re: [GENERAL] Is there a way to check which indexes are being used

2006-02-23 Thread Vivek Khera
On Feb 23, 2006, at 8:47 AM, Ragnar wrote: select * from pg_stat_user_indexes ; which level of stats do I need to enable this? block level or row level or both? thanks. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Is there a way to check which indexes are being used

2006-02-23 Thread Jim C. Nasby
On Thu, Feb 23, 2006 at 10:44:38AM -0500, Vivek Khera wrote: On Feb 23, 2006, at 8:47 AM, Ragnar wrote: select * from pg_stat_user_indexes ; which level of stats do I need to enable this? block level or row level or both? Either-or, AFAIK. Block level will present less load on the