Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-13154

Add an option to remove DESC NULLS LAST to improve performance

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.7.3, 5.8
    • Fix Version/s: 5.8.0-HF06, 5.9.2
    • Component/s: Core VCS

      Description

      For request that match millions of documents sorted, the "Index Scan Backward" on PostgreSQL (and equivalent for Oracle) must be used to get fast results.

      This is possible only if there is no NULL values on the sorted column which requires 2 things:

      • NXP-11521 to add a "AND sorted_column IS NOT NULL" clause
      • Remove the "NULLS LAST" option for the ORDER BY when asking for descending order.

      Note that removing "NULLS LAST" will gives different result order depending on database backend:

      • Oracle and Postgres are putting NULLS values first on DESC
      • other DB are putting NULLS values last

      The "NULLS LAST" option has been added to make unit test and selenium behave the same for all db.

      We should add a repository option to not add "NULLS LAST" when performance matter.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: