Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-370

Benefit of the _id primary key column

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Won't Do
    • None
    • None
    • Core: Platform

    Description

      Each postgres table has a payload field (jsonb) and a primary key field with default name _id.
      "What benefits does the column offer over an index on the id property extracted from the JSON?" was asked in RMB-277.

      Answer:

      PRIMARY KEY (and UNIQUE) and the foreign key constraint REFERENCES only work on a column, not on an expression like jsonb->'id'.
      id saves 9 characters compared to jsonb->'id'.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                julianladisch Julian Ladisch
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases