Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7.12
    • 1.7.12
    • None
    • None
    • PostgreSQL

    Description

      The postgres totalnum script takes a very long time to run because a self-join on an ontology table with a LIKE clause on c_fullname takes ages. The same query on MSSQL with the same tables and same indices takes <5s.

      select distinct p1.c_fullname, p2.c_basecode
      from dimCountOnt p1
      inner join dimCountOnt p2
      on p2.c_fullname like p1.c_fullname||'%' escape '#'
       where p2.c_fullname like '\i2b2\Diagnoses\%' escape '#'
      and p1.c_fullname like '\\i2b2\\Diagnoses\\%'

      Using specialized postgres indices did not help:

      create index dimCountOntA on dimCountOnt using spgist (c_fullname);
      CREATE INDEX dimCountOntB ON dimCountOnt(c_fullname text_pattern_ops);
      CREATE INDEX dimCountOntBjk ON dimCountOnt USING btree(c_fullname varchar_pattern_ops);

      Attachments

        Issue Links

          Activity

            jklann Jeffrey Klann created issue -
            jklann Jeffrey Klann made changes -
            Field Original Value New Value
            Fix Version/s 1.7.13 [ 11002 ]
            jklann Jeffrey Klann made changes -
            Affects Version/s 1.7.12 [ 11000 ]
            jklann Jeffrey Klann made changes -
            Assignee Jeffrey Klann [ jklann ]
            jklann Jeffrey Klann made changes -
            Fix Version/s 1.7.12 [ 10901 ]
            Fix Version/s 1.7.13 [ 11002 ]
            Key WEBCLIENT-317 CORE-379
            Affects Version/s 1.7.12 [ 10901 ]
            Affects Version/s 1.7.12 [ 11000 ]
            Workflow Web Client Issues Workflow [ 12106 ] i2b2 Issues Workflow [ 12108 ]
            Project i2b2 Web Client [ 10033 ] i2b2 Core Software [ 10034 ]
            jklann Jeffrey Klann made changes -
            Status New [ 10000 ] Open [ 1 ]
            jklann Jeffrey Klann made changes -
            Link This issue related to CORE-343 [ CORE-343 ]
            jklann Jeffrey Klann made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jklann Jeffrey Klann made changes -
            Status In Progress [ 3 ] Ready to Test [ 10001 ]
            jklann Jeffrey Klann made changes -
            Assignee Jeffrey Klann [ jklann ] Reeta Metta [ rm302 ]
            rm302 Reeta Metta made changes -
            Status Ready to Test [ 10001 ] Testing [ 10002 ]
            jklann Jeffrey Klann made changes -
            Fix Version/s 1.7.13 [ 10902 ]
            Fix Version/s 1.7.12 [ 10901 ]
            jklann Jeffrey Klann made changes -
            Fix Version/s 1.7.12 [ 10901 ]
            Fix Version/s 1.7.13 [ 10902 ]
            rm302 Reeta Metta made changes -
            Fix Version/s 1.7.13 [ 10902 ]
            Fix Version/s 1.7.12 [ 10901 ]
            rm302 Reeta Metta made changes -
            Assignee Reeta Metta [ rm302 ] Jeffrey Klann [ jklann ]
            Status Testing [ 10002 ] Reopened [ 4 ]
            jklann Jeffrey Klann made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            rm302 Reeta Metta made changes -
            Fix Version/s 1.7.12 [ 10901 ]
            Fix Version/s 1.7.13 [ 10902 ]
            rm302 Reeta Metta made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

              jklann Jeffrey Klann
              mmendis mike mendis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: