Re: [PERFORM] In progress INSERT wrecks plans on table

2013-07-12 Thread Jeff Janes
On Mon, May 6, 2013 at 1:14 AM, Simon Riggs wrote: > On 6 May 2013 02:51, Mark Kirkwood wrote: >> On 05/05/13 00:49, Simon Riggs wrote: >>> >>> On 3 May 2013 13:41, Simon Riggs wrote: >>> (3) to make the check on TransactionIdIsInProgress() into a heuristic, since we don't *need* to ch

Re: [PERFORM] Trying to eliminate union and sort

2013-07-12 Thread Josh Berkus
> As for the counts on the tables: > table1 3,653,472 > table2 2,191,314 > table325,676,589 > > I think it's safe to assume right now that any resulting joins are not > one-to-one Hmmm? How is doing a subselect in the SELECT clause even working, then? -- Josh Berkus PostgreSQL

Re: [PERFORM] Trying to eliminate union and sort

2013-07-12 Thread Brian Fehrle
On 07/11/2013 06:46 PM, Josh Berkus wrote: Brian, 3. I'm trying to eliminate the union, however I have two problems. A) I can't figure out how to have an 'or' clause in a single join that would fetch all the correct rows. If I just do: LEFT OUTER JOIN table2 t2 ON (t2.real_id = t.id OR t2.real_