Uploaded image for project: 'FTS'
  1. FTS
  2. FTS-940

Optimize query in getActivePairs

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: fts 3.7.0
    • Component/s: MySQL
    • Security Level: Public Data (This ticket is visible to anyone on the internet and will be indexed by search engines)
    • Labels:
      None

      Description

      Seems like this one is a better candidate:

      select sql_no_cache distinct source_se, dest_se from t_file where file_state IN ('ACTIVE', 'SUBMITTED') group by source_se, dest_se, file_state order by null;
      

      402 rows in set (0.07 sec)

      Compare with the naive

      select sql_no_cache distinct source_se, dest_se from t_file where file_state IN ('ACTIVE', 'SUBMITTED');
      

      402 rows in set (1.90 sec)

      The current one does a join with t_optimize, but the intention is to get all active pairs, so I think we can skip that join.

        Attachments

          Activity

            People

            • Assignee:
              aalvarez Alejandro Alvarez Ayllon
              Reporter:
              aalvarez Alejandro Alvarez Ayllon
              Component Watchers:
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Actual Start: