Re: [GENERAL] simple update query too long

2011-05-13 Thread Merlin Moncure
On Fri, May 13, 2011 at 2:07 AM, F T wrote: > Thanks for your ideas. > > I have rerun my tests and I agree with Merlin, PostgreSQL is not adapted at > all to handle wide updates. > > Summary : > The table contains 2 millions rows. > > Test 1 : > UPDATE grille SET inter=0; -> It tooks 10 hours > >

Re: [GENERAL] simple update query too long

2011-05-13 Thread Isabella Ghiurea
Hi, I would suggest if you can try one of this options: 0- create a new index on " inter "column for grille table and in your WHERE clause try to limit the number of update rows instead of 2mills for one the whole transaction , something like :where inter > x and inter < y; 1- drop at least t

Re: [GENERAL] simple update query too long

2011-05-13 Thread Misa Simic
Hi, Would it be faster if you create Partial Index on inter field (btree) where inter > 0 and then UPDATE grille SET inter = 0 WHERE inter > 0 Kind Regards, Misa 2011/5/9 F T > Hi list > > I use PostgreSQL 8.4.4. (with Postgis 1.4) > > I have a simple update query that takes hours to run. >

Re: [GENERAL] simple update query too long

2011-05-13 Thread Oleg Bartunov
On Fri, 13 May 2011, F T wrote: Thanks for your ideas. I have rerun my tests and I agree with Merlin, PostgreSQL is not adapted at all to handle wide updates. Summary : The table contains 2 millions rows. Test 1 : UPDATE grille SET inter=0; -> It tooks 10 hours Test 2 : I remove the spatial

Re: [GENERAL] simple update query too long

2011-05-13 Thread Pavel Stehule
2011/5/13 F T : > Thanks for your ideas. > > I have rerun my tests and I agree with Merlin, PostgreSQL is not adapted at > all to handle wide updates. > > Summary : > The table contains 2 millions rows. > > Test 1 : > UPDATE grille SET inter=0; -> It tooks 10 hours > > Test 2 : > I remove the spati

Re: [GENERAL] simple update query too long

2011-05-13 Thread F T
Thanks for your ideas. I have rerun my tests and I agree with Merlin, PostgreSQL is not adapted at all to handle wide updates. Summary : The table contains 2 millions rows. Test 1 : UPDATE grille SET inter=0; -> It tooks 10 hours Test 2 : I remove the spatial Gist index, and the constraints : I

Re: [GENERAL] simple update query too long

2011-05-09 Thread Merlin Moncure
On Mon, May 9, 2011 at 10:29 AM, wrote: >> On 05/09/2011 04:39 PM, F T wrote: >>> Hi list >>> >>> I use PostgreSQL 8.4.4. (with Postgis 1.4) >>> >>> I have a simple update query that takes hours to run. >>> The table is rather big (2 millions records) but it takes more than 5 >>> hours >>> to run

Re: [GENERAL] simple update query too long

2011-05-09 Thread tv
> On 05/09/2011 04:39 PM, F T wrote: >> Hi list >> >> I use PostgreSQL 8.4.4. (with Postgis 1.4) >> >> I have a simple update query that takes hours to run. >> The table is rather big (2 millions records) but it takes more than 5 >> hours >> to run !! >> >> The query is just : >> *UPDATE grille SET

Re: [GENERAL] simple update query too long

2011-05-09 Thread Guillaume Lelarge
On 05/09/2011 04:39 PM, F T wrote: > Hi list > > I use PostgreSQL 8.4.4. (with Postgis 1.4) > > I have a simple update query that takes hours to run. > The table is rather big (2 millions records) but it takes more than 5 hours > to run !! > > The query is just : > *UPDATE grille SET inter = 0*