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.
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.
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() ?
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.
It will work whether there is a record in the buffer or not.
P.S. There is nothing for the database as a whole - only at the table level.
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
VIEW-AS ALERT-BOX INFO BUTTONS OK.
MESSAGE "Not enabled"
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".
Personally I support the idea of adding it to the language, but in the meantime...
MESSAGE CAN-FIND(_File "_Partition-Policy").
Other than consistency with multi-tenancy, what is the use case for adding an IsPartitioned language element?
Sr. Development Manager