Login Register Actian.com  

Actian Community Wiki

Navigation
Learn About
Developing With
Ingres Talk
Information
Toolbox

Partitioned global temporary tables

From Ingres Community Wiki

Jump to: navigation, search

More info coming later / someday, but a couple notes about partitioned global temporary tables:

The major change is storing the partition definition in DMF, since there's no other place to put it. (Just like the table definition is in DMF in the form of the TCB.) Passing the necessary data structures through dmu into dmt-create and thence into dm2t was a bit tricky, with the chosen solution being the addition of a DMU_CB pointer in the DMT_CB, for passing GTT create info. Parser and RDF changes were relatively minor. DMT-SHOW needed some untangling as well but nothing serious.

An unresolved issue is that GTT load (aka build) operates in so-called in-memory mode. Normal table load stores rows into a set of build buffers (dm1x) which are then written directly to the table file. GTT's don't necessarily have an underlying disk file, so GTT loads right into the DMF cache. The data structures involved are not suitable for partitioned GTT. This affects load and modify.

My preferred solution for the load issue is to get rid of in-memory build entirely. It's wrong-headed in any event, since it pollutes the DMF cache unnecessarily for large loads, and adds complexity for small ones. My suggestion is to run a GTT load like any other, into dm1x build buffers. If the build buffers must spill, a little care would be needed to create the underlying disk file at that time, but I suspect most of that would just fall out. At the end of the GTT load, if the buffers spilled, we'd end like any other load and flush them. If the buffers had NOT spilled, ie the GTT is small enough to fit in memory, we would at that point acquire cache buffers and slam the build buffer contents right into the DMF cache.

All of the parsing and table create/drop code is done, basically everything except the solution for load. It's tangled up with "declare temporary register" in the big Datallegro ball of string that continues to await cycles (from both both sides, me and Ingres) to get worked on.

Personal tools
© 2011 Actian Corporation. All Rights Reserved