[PERFORM] index not used again

2006-03-31 Thread Jan Kesten
Hi folks! I have just a issue again with unused indexes. I have a database with a couple of tables and I have to do an sync job with them. For marking which row has to be transfered I added a new column token (integer, I will need some more tokens in near future) to every table. Before determini

Re: [PERFORM] index not used again

2006-03-31 Thread Stephan Szabo
On Fri, 31 Mar 2006, Jan Kesten wrote: > > Hi folks! > > I have just a issue again with unused indexes. I have a database with a > couple of tables and I have to do an sync job with them. For marking > which row has to be transfered I added a new column token (integer, I > will need some more toke

Re: [PERFORM] simple join uses indexes, very slow

2006-03-31 Thread Jim C. Nasby
On Wed, Mar 29, 2006 at 01:08:15AM -0500, stef wrote: > > If your looking for suggestions, I would suggest updating the 8.1.x you > have installed to the latest version, as of typing this is 8.1.3 ;) Most > notable is some of the -bug- fixes that are in since 8.1.0, for example; > > * Fix inco

Re: [PERFORM] Indexes with descending date columns

2006-03-31 Thread Jim C. Nasby
On Wed, Mar 29, 2006 at 12:52:31PM +0200, Theo Kramer wrote: > On Fri, 2006-03-24 at 12:21, Jim C. Nasby wrote: > > On Thu, Mar 23, 2006 at 01:09:49PM +0200, Theo Kramer wrote: > > > ii If no to i, is it feasible to extend PostgreSQL to allow traversing > > >an index in column descending and co

Re: [PERFORM] Query using SeqScan instead of IndexScan

2006-03-31 Thread Jim C. Nasby
What's the correlation of category_id? The current index scan cost estimator places a heavy penalty on anything with a correlation much below about 90%. On Wed, Mar 29, 2006 at 08:12:28PM -0700, Brendan Duddridge wrote: > Hi, > > I have a query that is using a sequential scan instead of an index

[PERFORM] un-'vacuum analyse'

2006-03-31 Thread Frederic Back
Hello, I would like to know how my application works before and after data from VACUUM ANALYSE is available. Is there a way to de-'vacuum analyse' a database for testing purposes? Thank you, Fred ---(end of broadcast)--- TIP 1: if posting/reading

Re: [PERFORM] un-'vacuum analyse'

2006-03-31 Thread Tom Lane
Frederic Back <[EMAIL PROTECTED]> writes: > Is there a way to de-'vacuum analyse' a database for > testing purposes? "DELETE FROM pg_statistic" will get you most of the way there. It doesn't get rid of the accurate relpages/reltuples entries in pg_class, but since CREATE INDEX also updates those c

Re: [PERFORM] [Solved] Slow performance on Windows .NET and OleDb

2006-03-31 Thread Antoine
This is a blatant thread steal... but here we go... Do people have any opinions on the pgsql driver? How does it compare with the odbc in terms of performance? Is it fully production ready? The boss wants to go .net (instead of Java, which is my preference...) - will I have to spend my time defendi

Re: [PERFORM] [Solved] Slow performance on Windows .NET and OleDb

2006-03-31 Thread Magnus Hagander
> This is a blatant thread steal... but here we go... > Do people have any opinions on the pgsql driver? It's very nice. > How does it compare with the odbc in terms of performance? I haven't measured specifically, but if you're tlaking .net it should be better. It's all in managed code, so you

Re: [PERFORM] Query using SeqScan instead of IndexScan

2006-03-31 Thread Brendan Duddridge
Hi Jim, I'm not quite sure what you mean by the correlation of category_id? The category_id is part of a compound primary key in the category_product table. The primary key on category_product is (category_id, product_id). Here's the definitions of the two tables involved in the join:

Re: [PERFORM] Query using SeqScan instead of IndexScan

2006-03-31 Thread chris smith
On 4/1/06, Brendan Duddridge <[EMAIL PROTECTED]> wrote: > Hi Jim, > > I'm not quite sure what you mean by the correlation of category_id? It means how many distinct values does it have (at least that's my understanding of it ;) ). select category_id, count(*) from category_product group by catego

Re: [PERFORM] Query using SeqScan instead of IndexScan

2006-03-31 Thread Brendan Duddridge
Ah I see. Ok, well we have a very wide variety here... category_id | count -+--- 1000521 | 31145 1001211 | 22991 1001490 | 22019 1001628 | 12472 146 | 10480 187 | 10338 1001223 | 10020 1001560 | 9532 1000954 | 8633 100131