RelOptInfo cache

Started by Adriano Langeover 16 years ago1 messages
#1Adriano Lange
alange0001@gmail.com
2 attachment(s)

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

Attachments:

twopo.ctext/x-csrc; name=twopo.cDownload
twopo.htext/x-chdr; name=twopo.hDownload