Re: [PERFORM] Outer joins and Seq scans

2007-10-28 Thread Tom Lane
Sami Dalouche <[EMAIL PROTECTED]> writes: > So, the version of postgres I use is : > [EMAIL PROTECTED]:~/Desktop $ dpkg -l | grep postgres > ii postgresql-8.2 8.2.5-1.1 OK. I think you have run afoul of a bug that was introduced in 8.2.5 that causes it not to realize

Re: [PERFORM] Outer joins and Seq scans

2007-10-28 Thread Sami Dalouche
Hi, Sorry for not giving enough information.. I didn't want to pollute you with too much detail... So, the version of postgres I use is : [EMAIL PROTECTED]:~/Desktop $ dpkg -l | grep postgres ii postgresql-8.2 8.2.5-1.1 object-relational SQL database, version 8.2 ii

Re: [PERFORM] Outer joins and Seq scans

2007-10-28 Thread Tom Lane
Sami Dalouche <[EMAIL PROTECTED]> writes: > So, what could prevent postgrs from using the index ? You've carefully withheld all the details that might let us guess. If I had to guess anyway, I'd guess this is a pre-8.2 PG release that doesn't know how to rearrange outer joins, but there are any nu

[PERFORM] Outer joins and Seq scans

2007-10-28 Thread Sami Dalouche
Hi, I have a query that uses left outer join, and this seems to prevent the index on the right column to be used. I couldn't really trim down the query without having the index used normally.. So, I have the following tables that join : Offer -> AdCreatedEvent -> Account -> ContactInformation

Re: [PERFORM] Append Cost in query planners

2007-10-28 Thread Heikki Linnakangas
Nimesh Satam wrote: > Following is the full plan of the query using partition. Let me know if you > need any further information. What indexes are there on the table partitions? You didn't post the query, but it looks like your doing a join between rpt_network and the partitioned table. An index o

Re: [PERFORM] partitioned table and ORDER BY indexed_field DESCLIMIT 1

2007-10-28 Thread Simon Riggs
On Sun, 2007-10-28 at 12:53 -0400, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> writes: > > I agree its annoying and I have a way of doing this, but that's an 8.4 > > thing now. > > It was an 8.4 thing quite some time ago, since no working patch was ever > submitted. Sorry, I meant that the

Re: [PERFORM] partitioned table and ORDER BY indexed_field DESCLIMIT 1

2007-10-28 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > I agree its annoying and I have a way of doing this, but that's an 8.4 > thing now. It was an 8.4 thing quite some time ago, since no working patch was ever submitted. regards, tom lane ---(end of broadcast

Re: [PERFORM] Append Cost in query planners

2007-10-28 Thread Heikki Linnakangas
Nimesh Satam wrote: > We are trying to implement partition on one tables on date basis. the > overall cost and timming and cost of the query is increasing on the Append > of the child table output. As shown below: > > *-> Append (cost=0.00..112217.92 rows=2752906 width=52) (actual time= > 2454.2

[PERFORM] Append Cost in query planners

2007-10-28 Thread Nimesh Satam
All, We are trying to implement partition on one tables on date basis. the overall cost and timming and cost of the query is increasing on the Append of the child table output. As shown below: *-> Append (cost=0.00..112217.92 rows=2752906 width=52) (actual time= 2454.207..20712.021 rows=2752905

Re: [PERFORM] partitioned table and ORDER BY indexed_field DESCLIMIT 1

2007-10-28 Thread Simon Riggs
On Sat, 2007-10-27 at 17:48 -0400, Luke Lonergan wrote: > Works great - plans no longer sort, but rather use indices as > expected. It's in use in Greenplum now. > > It's a simple approach, should easily extend from gpdb to postgres. > The patch is against gpdb so someone needs to 'port' it. The