Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-481

implement SQL generated columns

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.0.2.1
    • 10.5.1.1
    • SQL
    • None
    • Patch Available

    Description

      Satheesh has pointed out that generated columns, a SQL 2003 feature, would satisfy the performance requirements of Expression Indexes (bug 455). Generated columns may not be as elegant as Expression Indexes, but they are easier to implement. We would allow the following new kind of column definition in CREATE TABLE and ALTER TABLE statements:

      columnName GENERATED ALWAYS AS ( expression )

      If expression were an indexableExpression (as defined in bug 455), then we could create indexes on it. There is no work for the optimizer to do here. The Language merely has to compute the generated column at INSERT/UPDATE time.

      Attachments

        1. derby-481-00-aa-prototype.diff
          132 kB
          Richard N. Hillegas
        2. derby-481-01-aa-catalog.diff
          5 kB
          Richard N. Hillegas
        3. derby-481-02-aa-utilities.diff
          34 kB
          Richard N. Hillegas
        4. derby-481-03-aa-grammar.diff
          60 kB
          Richard N. Hillegas
        5. derby-481-04-aa-insert.diff
          48 kB
          Richard N. Hillegas
        6. derby-481-05-aa-update.diff
          51 kB
          Richard N. Hillegas
        7. derby-481-06-aa-genreferences.diff
          12 kB
          Richard N. Hillegas
        8. derby-481-07-aa-noSQLinRoutines.diff
          10 kB
          Richard N. Hillegas
        9. derby-481-07-ab-noSQLinRoutines.diff
          11 kB
          Richard N. Hillegas
        10. derby-481-08-aa-castToDeclaredType.diff
          19 kB
          Richard N. Hillegas
        11. derby-481-09-aa-dummyDefaults.diff
          3 kB
          Richard N. Hillegas
        12. derby-481-10-aa-foreignKeyActions.diff
          16 kB
          Richard N. Hillegas
        13. derby-481-11-aa-notNull.diff
          19 kB
          Richard N. Hillegas
        14. derby-481-12-aa-padding.diff
          4 kB
          Richard N. Hillegas
        15. derby-481-13-aa-alterDatatype.diff
          5 kB
          Richard N. Hillegas
        16. derby-481-14-ab-dropColumn.diff
          45 kB
          Richard N. Hillegas
        17. derby-481-15-aa-renameAndAddDefault.diff
          7 kB
          Richard N. Hillegas
        18. derby-481-16-aa-dropFunction.diff
          15 kB
          Richard N. Hillegas
        19. derby-481-17-aa-currentSchema.diff
          0.9 kB
          Richard N. Hillegas
        20. derby-481-18-aa-updatableResultSets.diff
          6 kB
          Richard N. Hillegas
        21. derby-481-19-aa-cleanup.diff
          11 kB
          Richard N. Hillegas
        22. derby-481-20-aa-cleanup.diff
          8 kB
          Richard N. Hillegas
        23. derby-481-21-aa-bulkImport.diff
          5 kB
          Richard N. Hillegas
        24. GeneratedColumns.html
          23 kB
          Richard N. Hillegas
        25. GeneratedColumns.html
          23 kB
          Richard N. Hillegas
        26. GeneratedColumns.html
          21 kB
          Richard N. Hillegas

        Issue Links

          Activity

            People

              rhillegas Richard N. Hillegas
              rhillegas Richard N. Hillegas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: