Partitioning

Posted by Alex Hart on 20-Feb-2014 08:08

Who as been playing with Horizontal Partitioning? I have some issues/question and wondered if we discuss it here or is there another avenue? And would love to see what other people discovered.

All Replies

Posted by Bill Wood on 20-Feb-2014 08:19

This is the correct forum for discussing this feature.  One person did reply to Kris' original announcement on Table-Partitioning ESAP, but adding new threads is appropriate if you have questions/comments.

Posted by randallkharp on 28-Feb-2014 12:26

Currently, a DB enabled for multi-tenancy can be identified via ABL using the IS-DB-MULTI-TENANT () function. Is there or will there be something similar for identifying a DB enabled for table partitioning, e.g. IS-DB-PARTITIONED() ?

Posted by Laura Stern on 28-Feb-2014 13:29

The BUFFER handle will have an attribute IS-PARTITIONED.  This can be used if you are doing dynamic programming, but will also work when you are using static table references, e.g.,

hdl = BUFFER customer:HANDLE.

MESSAGE hdl:IS-PARTITIONED

It will work whether there is a record in the buffer or not.

Posted by Laura Stern on 28-Feb-2014 13:30

P.S.  There is nothing for the database as a whole - only at the table level.

Posted by Garry Hall on 28-Feb-2014 15:15

The existence of the _Partition-Policy table will identify that the database has been enabled for table partitioning. Enabling the database for table partitioning will add this table to the schema.

FIND FIRST _FILE WHERE _FILE._FILE-NAME = "_Partition-Policy" NO-ERROR.

IF ERROR-STATUS:NUM-MESSAGES = 0 THEN

   MESSAGE "Enabled"

       VIEW-AS ALERT-BOX INFO BUTTONS OK.

ELSE

   MESSAGE "Not enabled"

       VIEW-AS ALERT-BOX INFO BUTTONS OK.

Posted by Richard Banville on 28-Feb-2014 15:31

Alternatively, you can use the db feature vst.  Note the "if available" is needed in addition to the check for enablement for backward compatibility of your request.

find _Database-Feature where _DBFeature_Name = "Table Partitioning" no-lock no-error.

if available( _Database-Feature) and _DBFeature_Enabled = "1"  then

 message "table partitioning is enabled".

Posted by Aidan Jeffery on 28-Feb-2014 21:39

Personally I support the idea of adding it to the language, but in the meantime...

MESSAGE CAN-FIND(_File "_Partition-Policy").

Posted by Evan Bleicher on 01-Mar-2014 08:45

Other than consistency with multi-tenancy, what is the use case for adding an IsPartitioned  language element?  

This thread is closed