Derby
  1. Derby
  2. DERBY-5799

add more info on when Derby chooses 32k page size for tables.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.8.2.2, 10.9.1.0
    • Fix Version/s: 10.8.3.0, 10.9.2.2, 10.10.1.1
    • Component/s: Documentation
    • Labels:
      None

      Description

      Enhance the following documentation to explain all cases when Derby will default a table to 32k.
      current doc:
      http://db.apache.org/derby/docs/10.8/ref/rrefproper40688.html

      1) better describe what "long" means. Originally this was clear as it meant just datatypes with
      the "long" qualifier. Now it also includes Blob and Clob columns. Not sure if we should list
      all the types, or just something like long, Blob and/or Clob.

      2) Derby will also choose 32k if the approximate length of the columns declared at create time is greater than 4k. Approximate is used as each different datatype may or may not be fixed length
      when stored on the page. Character data may take 1, 2, or 3 bytes per character, obviously
      variable length data like varchar can't be known at create time, ...
      I don't think we should try to document exact derby algorithm, rather doc that Derby will default
      to what it thinks should be the best size of either 4k or 32k unless user chooses to override. I
      do think it is useful to doc that Derby will include both existence of long columns and the estimate
      length of the row.

      Here some comments from Property.java that describes constants used, if these constants every change then documentation would change also:
      /**

      • The default page size to use for tables that contain a long column.
        **/
        public static final String PAGE_SIZE_DEFAULT_LONG = "32768";

      /**

      • The bump threshold for pages sizes for create tables
      • If the approximate column sizes of a table is greater than this
      • threshold, the page size for the tbl is bumped to PAGE_SIZE_DEFAULT_LONG
      • provided the page size is not already specified as a property
        **/
        public static final int TBL_PAGE_SIZE_BUMP_THRESHOLD = 4096;

      /**

      • The bump threshold for pages size for index.
      • If the approximate key columns of an index is greater than this
      • threshold, the page size for the index is bumped to PAGE_SIZE_DEFAULT_LON
        G
      • provided the page size is not already specified as a property
        **/
        public static final int IDX_PAGE_SIZE_BUMP_THRESHOLD = 1024;
      1. DERBY-5799.diff
        1 kB
        Kim Haase
      2. rrefproper40688.html
        14 kB
        Kim Haase

        Activity

        Mike Matrigali created issue -
        Kim Haase made changes -
        Field Original Value New Value
        Assignee Kim Haase [ chaase3 ]
        Kim Haase made changes -
        Attachment DERBY-5799.diff [ 12545778 ]
        Attachment rrefproper40688.html [ 12545779 ]
        Kim Haase made changes -
        Affects Version/s 10.9.1.0 [ 12316344 ]
        Issue & fix info Patch Available [ 10102 ]
        Kim Haase made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Issue & fix info Patch Available [ 10102 ]
        Fix Version/s 10.8.2.3 [ 12318540 ]
        Fix Version/s 10.9.1.1 [ 12321551 ]
        Fix Version/s 10.10.0.0 [ 12321550 ]
        Resolution Fixed [ 1 ]
        Kim Haase made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Kathey Marsden made changes -
        Fix Version/s 10.8.3.0 [ 12323456 ]
        Fix Version/s 10.8.2.3 [ 12318540 ]
        Kathey Marsden made changes -
        Fix Version/s 10.9.2.0 [ 12323562 ]
        Fix Version/s 10.9.1.1 [ 12321551 ]
        Gavin made changes -
        Workflow jira [ 12672175 ] Default workflow, editable Closed status [ 12802137 ]

          People

          • Assignee:
            Kim Haase
            Reporter:
            Mike Matrigali
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development