Re: [PERFORM] Query performance with disabled hashjoin and mergejoin

2011-03-08 Thread Merlin Moncure
On Tue, Mar 8, 2011 at 2:57 PM, Robert Haas wrote: > On Mon, Mar 7, 2011 at 3:40 PM, Merlin Moncure wrote: >> On Tue, Feb 22, 2011 at 9:07 PM, Robert Haas wrote: >>> On Fri, Feb 4, 2011 at 7:08 AM, Ivan Voras wrote:                                 ->  BitmapAnd  (cost=1282.94..1282.94

Re: [PERFORM] Query performance with disabled hashjoin and mergejoin

2011-03-08 Thread Tom Lane
Robert Haas writes: > The reason I thought cross-column correlations might be relevant is > that the bitmap index scan on news_visible_from is quite accurate > (19976 estimated vs. 19932 actual) and the bitmap index scan on > news_visible_to is tolerably accurate (151 estimated vs. 41 actual) > bu

Re: [PERFORM] Query performance with disabled hashjoin and mergejoin

2011-03-08 Thread Robert Haas
On Mon, Mar 7, 2011 at 3:40 PM, Merlin Moncure wrote: > On Tue, Feb 22, 2011 at 9:07 PM, Robert Haas wrote: >> On Fri, Feb 4, 2011 at 7:08 AM, Ivan Voras wrote: >>>                                 ->  BitmapAnd  (cost=1282.94..1282.94 >>> rows=1430 width=0) (actual time=5.508..5.508 rows=0 loops

Re: [PERFORM] Performance issues

2011-03-08 Thread Andy Colson
On 3/8/2011 10:58 AM, Andreas Forø Tollefsen wrote: Andy. Thanks. That is a great tips. I tried it but i get the error: NOTICE: ptarray_simplify returned a <2 pts array. Query: SELECT ST_Intersection(priogrid_land.cell, ST_Simplify(cshapeswdate.geom,0.1)) AS geom, priogrid_land.gid AS divider, g

Re: [PERFORM] Linux I/O schedulers - CFQ & random seeks

2011-03-08 Thread Mindaugas Riauba
Hello, > Once we ramped up production traffic on the machines, PostgreSQL > pretty much died under the load and could never get to a steady state. > I think this had something to do with the PG backends not having > enough I/O bandwidth (due to CFQ) to put data into cache fast enough. > This wen

Re: [PERFORM] Performance issues

2011-03-08 Thread Andreas Forø Tollefsen
Forgot to mention that the query terminates the connection because of a crash of server process. 2011/3/8 Andreas Forø Tollefsen > Andy. Thanks. That is a great tips. I tried it but i get the error: > NOTICE: ptarray_simplify returned a <2 pts array. > > Query: > SELECT ST_Intersection(priogrid_

Re: [PERFORM] Performance issues

2011-03-08 Thread Andreas Forø Tollefsen
Andy. Thanks. That is a great tips. I tried it but i get the error: NOTICE: ptarray_simplify returned a <2 pts array. Query: SELECT ST_Intersection(priogrid_land.cell, ST_Simplify(cshapeswdate.geom,0.1)) AS geom, priogrid_land.gid AS divider, gwcode, gwsyear, gweyear, startdate, enddate, capname,

[PERFORM] Table partitioning problem

2011-03-08 Thread Samba GUEYE
Hello, I have a problem with table partitioning because i have a foreign key applied on the partionned table and it throw a constraint violation error during inserts. I saw on the manual (http://www.postgresql.org/docs/8.4/interactive/ddl-inherit.html caveats section) that it's a limitation du

Re: [PERFORM] Performance issues

2011-03-08 Thread Andy Colson
I have seen really complex geometries cause problems. If you have thousands of points, when 10 would do, try ST_Simplify and see if it doesnt speed things up. -Andy On 3/8/2011 2:42 AM, Andreas Forø Tollefsen wrote: Hi. Thanks for the comments. My data is right, and the result is exactly wh

Re: [PERFORM] Performance trouble finding records through related records

2011-03-08 Thread sverhagen
Merlin Moncure-2 wrote: > > > 8.3? try converting the above to WHERE EXISTS or (even better) a JOIN... > > Thanks for that. But in my Mar 03, 2011; 10:19am post I already broke it down to the barebones with some variations, among which JOIN. The EXISTS IN variation was so poor that I left th

Re: [PERFORM] Performance trouble finding records through related records

2011-03-08 Thread sverhagen
Hi. Thanks for your response. Robert Haas wrote: > > Join Filter: ((events_events.transactionid)::text = > (customerdetails.transactionid)::text) > > Now why is there a cast to text there on both sides? Do those two > columns have exactly the same datatype? If not, you probably want to > fix

Re: [PERFORM] Performance issues

2011-03-08 Thread Andreas Forø Tollefsen
Hi. Thanks for the comments. My data is right, and the result is exactly what i want, but as you say i think what causes the query to be slow is the ST_Intersection which creates the intersection between the vector grid (fishnet) and the country polygons. I will check with the postgis user list if