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

Optimize query in getActivePairs

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • fts 3.7.0
    • MySQL
    • Security Level: Public Data (This ticket is visible to anyone on the internet and will be indexed by search engines)
    • 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

            aalvarez Alejandro Alvarez Ayllon (Inactive)
            aalvarez Alejandro Alvarez Ayllon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual Start: