Uploaded image for project: 'OpenDNSSEC'
  1. OpenDNSSEC
  2. OPENDNSSEC-234

sqlite kasp.db no index for foreign keys in referenced table

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.7
    • Fix Version/s: 1.3.8
    • Component/s: Enforcer
    • Labels:
      None

      Description

      SQLite does not create indexes in the tables referencing foreign keys, they need to be added manually:

      softhsm --init-token --slot 0 --label OpenDNSSEC --pin 1234 --so-pin 1234
      ods-ksmutil setup
      sqlite3 /var/opendnssec/kasp.db

      CREATE INDEX idx1 on dnsseckeys ( zone_id );
      CREATE INDEX idx2 on dnsseckeys ( keypair_id );
      CREATE INDEX idx3 on keypairs ( securitymodule_id );
      CREATE INDEX idx4 on keypairs ( policy_id );
      CREATE INDEX idx5 on zones ( policy_id );
      CREATE INDEX idx6 on parameters ( category_id );
      CREATE INDEX idx7 on parameters_policies ( parameter_id );
      CREATE INDEX idx8 on parameters_policies ( policy_id );

      ods-control enforcer start

      My tests with 1000 zones, clean setup, run enforcer and create ZSK and signconfs:

      without indexes: killed it at 283 zones, took 14 minutes. Was getting slower and slower so 1000 zones might have taken many hours.

      with indexes: 1 min 5 seconds !

      speed up: unknown, maybe 100000% + ?

        Attachments

          Activity

            People

            Assignee:
            sion Siôn Lloyd
            Reporter:
            jerry Jerry Lundström
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: