history_text_2 doesn't need to be a unique index

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Trivial
    • None
    • Affects Version/s: 2.0.6
    • Component/s: Server (S)
    • Environment:
      Centos 6.4 x64, PostgreSQL 9.1

      history_text table on PostgreSQL has 3 indexes:
      "history_text_pkey1" PRIMARY KEY, btree (id)
      "history_text_2" UNIQUE, btree (itemid, id)
      "history_text_1" btree (itemid, clock)

      Since the primary key is already unique, the history_text_2 index doesn't need to be unique at all.

      Also why does the history_text table out of all history tables the only one that has additional two indexes besides the (itemid, clock) index? Are they really needed.

            Assignee:
            Unassigned
            Reporter:
            Strahinja Kustudic
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: