Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Ben-Nes Yonatan
Martijn van Oosterhout wrote: On Wed, Aug 31, 2005 at 09:19:05AM +0200, Ben-Nes Yonatan wrote: If the subtransaction writes at least a tuple, it counts as another transaction. Else it doesn't count. Oh crap I fear that now im in serious troubles Where can I read about this limitation? a

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Martijn van Oosterhout
On Wed, Aug 31, 2005 at 09:19:05AM +0200, Ben-Nes Yonatan wrote: > >If the subtransaction writes at least a tuple, it counts as another > >transaction. Else it doesn't count. > > > > Oh crap I fear that now im in serious troubles > Where can I read about this limitation? and beside that what

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Ben-Nes Yonatan
Alvaro Herrera wrote: On Tue, Aug 30, 2005 at 10:39:57PM -0500, Bruno Wolff III wrote: On Wed, Aug 31, 2005 at 01:27:30 +0200, Ben-Nes Yonatan <[EMAIL PROTECTED]> wrote: Now again im probably just paranoid but when I'm starting a transaction and in it im making more then 4 billions diffrent

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Alvaro Herrera
On Tue, Aug 30, 2005 at 10:39:57PM -0500, Bruno Wolff III wrote: > On Wed, Aug 31, 2005 at 01:27:30 +0200, > Ben-Nes Yonatan <[EMAIL PROTECTED]> wrote: > > > > Now again im probably just paranoid but when I'm starting a transaction > > and in it im making more then 4 billions diffrent queries

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Bruno Wolff III
On Wed, Aug 31, 2005 at 01:27:30 +0200, Ben-Nes Yonatan <[EMAIL PROTECTED]> wrote: > > Now again im probably just paranoid but when I'm starting a transaction > and in it im making more then 4 billions diffrent queries > (select,insert,update,truncate...) and then im closing it, its counted >

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Alvaro Herrera
On Wed, Aug 31, 2005 at 01:27:30AM +0200, Ben-Nes Yonatan wrote: > Now again im probably just paranoid but when I'm starting a transaction > and in it im making more then 4 billions diffrent queries > (select,insert,update,truncate...) and then im closing it, its counted > as only one transacti

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Ben-Nes Yonatan
Tom Lane wrote: Martijn van Oosterhout writes: rtree works on multidimesional (geometric) data. It can do range tests (is object A to the left of object B) but it's only applicable if your conditions can be interpreted that way. GiST is for creating custom index types, hardly likely to be

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Tom Lane
Martijn van Oosterhout writes: > rtree works on multidimesional (geometric) data. It can do range tests > (is object A to the left of object B) but it's only applicable if your > conditions can be interpreted that way. > GiST is for creating custom index types, hardly likely to be useful > in you

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Bruno Wolff III
On Tue, Aug 30, 2005 at 11:25:26 +0200, Ben-Nes Yonatan <[EMAIL PROTECTED]> wrote: > > If btree index is not suitable for this query then which index is? as > far as I understand the rtree index doesnt support range checks and the > hash index is not recommended by almost everyone (including t

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Martijn van Oosterhout
On Tue, Aug 30, 2005 at 11:25:26AM +0200, Ben-Nes Yonatan wrote: > Tom Lane wrote: > >However ... this query is basically going to suck with any btree index, > >because btree can't usefully do range checks on two separate variables. > >There's an exactly similar problem being discussed over in pgsq

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Ben-Nes Yonatan
Tom Lane wrote: Ben-Nes Yonatan <[EMAIL PROTECTED]> writes: Indexes: "items_items_id_key" UNIQUE, btree (items_id) "items_left" btree (left) "items_left_right" btree (left, right) You could get rid of the items_left index --- it's redundant with the first column of the combined i

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-29 Thread Tom Lane
Ben-Nes Yonatan <[EMAIL PROTECTED]> writes: > Indexes: > "items_items_id_key" UNIQUE, btree (items_id) > "items_left" btree (left) > "items_left_right" btree (left, right) You could get rid of the items_left index --- it's redundant with the first column of the combined index anyway

[GENERAL] Planner create a slow plan without an available index

2005-08-29 Thread Ben-Nes Yonatan
Hi All, I got a weird problem with the planner which cause my queries to take ages... ill try to explain it shortly and summarized... :) I got the following table (which got 1.2 million rows): Table "public.items" Column | Type | Modifier