Uploaded image for project: 'mod-orders-storage'
  1. mod-orders-storage
  2. MODORDSTOR-261

Juniper - Add indexes to improve searching speed of polines

    XMLWordPrintable

    Details

    • Template:
      Thunderjet/Firebird Back-end Story Template
    • Sprint:
      ACQ Sprint 127
    • Story Points:
      0
    • Development Team:
      Thunderjet
    • Release:
      R2 2021 Hot Fix #4
    • Hot Fix Approved by Cap Planning?:
      Yes
    • Hot Fix Approval Comments:
      Hide
      Data Import fix approved by CPT on Slack release_bug_triage channel 21 Sept 2021 (MODDICORE-177). Since it appears to be an Acq problem instead (MODINVOICE-318), and the MODINVOICE change needs this MODORDSTOR change to be more performant, copying that approval to this Jira.
      Show
      Data Import fix approved by CPT on Slack release_bug_triage channel 21 Sept 2021 ( MODDICORE-177 ). Since it appears to be an Acq problem instead ( MODINVOICE-318 ), and the MODINVOICE change needs this MODORDSTOR change to be more performant, copying that approval to this Jira.
    • RCA Group:
      Not a bug

      Description

      Purpose/Overview:
      In order to speedup searching of polines via GET /orders/order-lines database indexes should be added.

      Following warnings found in logs:

      WARNING: Doing FT search without index for po_line.jsonb->'vendorDetail'->>'referenceNumbers', CQL >>> SQL: vendorDetail.referenceNumbers = testRefNumber >>> get_tsvector(f_unaccent(po_line.jsonb->'vendorDetail'->>'referenceNumbers')) @@ tsquery_phrase(f_unaccent('testRefNumber'))
      
      WARNING: Doing LIKE search without index for acquisitions_unit.jsonb->>'isDeleted', CQL >>> SQL: isDeleted == false >>> lower(f_unaccent(acquisitions_unit.jsonb->>'isDeleted')) LIKE lower(f_unaccent('false'))
      
      WARNING: Doing LIKE search without index for acquisitions_unit.jsonb->>'protectRead', CQL >>> SQL: protectRead == false >>> lower(f_unaccent(acquisitions_unit.jsonb->>'protectRead')) LIKE lower(f_unaccent('false'))
      
      WARNING: Doing FT search without index for purchase_order.jsonb->>'acqUnitIds', CQL >>> SQL: purchaseOrder.acqUnitIds = 0ebb1f7d-983f-3026-8a4c-5318e0ebc041 >>> get_tsvector(f_unaccent(purchase_order.jsonb->>'acqUnitIds')) @@ tsquery_phrase(f_unaccent('0ebb1f7d-983f-3026-8a4c-5318e0ebc041'))
      

      Acceptance criteria:

      • Indexes added
      • No warnings present while invoking following requests:
        /orders-storage/po-lines?query=vendorDetail.referenceNumbers=("testRefNumber")
        
        /orders-storage/po-lines?query=purchaseOrder.acqUnitIds=(0ebb1f7d-983f-3026-8a4c-5318e0ebc041 OR d669b8cb-4b94-4193-a0f2-b77e8b77b2e6 )
        

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                siarhei_hrabko Siarhei Hrabko
                Reporter:
                siarhei_hrabko Siarhei Hrabko
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases