RelOptInfo cache

From: Adriano Lange <alange0001(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: RelOptInfo cache
Date: 2009-04-21 23:04:43
Message-ID: 49EE510B.1020508@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I implemented the Two Phase Optimizer based on an Ioannidis' paper to
make some tests. In this source, I used a struct, named treeNode, witch
can control a bottom-up RelOptInfo construction cache. This struct has a
RelOptInfo, 2 child pointer (treeNode *inner_child, *outer_child) and a
parent list (List *parents). The main idea is, if we want to join two
treeNodes (joinNodes()), we can first search in parent list of one
treeNode if the other treeNode is its brother.

Is there any structural problem in this approach? I have saw in geqo
source that there was a comment about this lack of optimization. I
remember that the geqo used a memory context switch for each plan
evaluation.

The source code of 2PO (twopo) is attached for any test.

(Sorry by any (many) grammatical mistake)

---
Adriano Lange

Attachment Content-Type Size
twopo.c text/x-csrc 17.6 KB
twopo.h text/x-chdr 2.0 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-04-21 23:13:22 Re: trouble with to_char('L')
Previous Message Tom Lane 2009-04-21 21:18:43 Re: [ADMIN] License Issue