[PERFORM] poor execution plan because column dependence

2011-04-12 Thread Václav Ovsík
Hi, I have done migration of the Request Tracker 3.8.9 (http://requesttracker.wikia.com/wiki/HomePage) from Mysql to PostgreSQL in testing environment. The RT schema used can be viewed at https://github.com/bestpractical/rt/blob/3.8-trunk/etc/schema.Pg. I have added full text search on table

Re: [PERFORM] poor execution plan because column dependence

2011-04-13 Thread Václav Ovsík
Dear Bob, On Tue, Apr 12, 2011 at 05:14:29PM -0700, Bob Lunney wrote: Zito, Using psql log in as the database owner and run analyze verbose. Happiness will ensue. Unfortunately not. I ran analyze with different values default_statistics_target till 1000 as first tries always with the same

Re: [PERFORM] poor execution plan because column dependence

2011-04-13 Thread Václav Ovsík
Dear Tom, On Tue, Apr 12, 2011 at 08:52:15PM -0400, Tom Lane wrote: .. Yeah, that main.EffectiveId = main.id clause is going to be underestimated by a factor of about 200, which is most though not all of your rowcount error for that table. Not sure whether you can do much about it, if the

Re: [PERFORM] poor execution plan because column dependence

2011-04-14 Thread Václav Ovsík
On Wed, Apr 13, 2011 at 12:24:06PM -0400, Tom Lane wrote: Interesting the original index tickets5 is still used for int4eq(main.effectiveid, main.id), no need to build a different. Well, no, it won't be. This hack is entirely dependent on the fact that the optimizer mostly works with

Re: [PERFORM] poor execution plan because column dependence

2011-04-15 Thread Václav Ovsík
Dear Tom, On Thu, Apr 14, 2011 at 10:10:44AM -0400, Tom Lane wrote: =?iso-8859-1?Q?V=E1clav_Ovs=EDk?= vaclav.ov...@i.cz writes: I'm not certain about your sentence touching int4eq() and index. The execution plan as show in my previous mail contains information about using index tickets5: