I believe these happen for the autocomplete on ticket Owner fields. We've noticed that AJAX call being very slow already. [#1715] would change the behavior of this field, so if the slow query can not easily be fixed, we could do [#1715] instead
Wed Oct 3 18:44:28 [conn4130232] command pyforge.$cmd command: { count: "user", fields: null, query: { display_name: /(?i)masterbunnyfu/i } } ntoreturn:1 reslen:48 3994ms Wed Oct 3 18:44:40 [conn4130232] query pyforge.user query: { $query: { display_name: /(?i)masterbunnyfu/i }, $orderby: { username: 1 } } nscanned:409118 reslen:20 11789ms Wed Oct 3 18:48:10 [conn4130137] command pyforge.$cmd command: { count: "user", fields: null, query: { display_name: /(?i)masterbunnyfu/i } } ntoreturn:1 reslen:48 7722ms Wed Oct 3 18:48:19 [conn4130137] query pyforge.user query: { $query: { display_name: /(?i)masterbunnyfu/i }, $orderby: { username: 1 } } nscanned:409118 reslen:20 9576ms Wed Oct 3 18:55:11 [conn4131242] command pyforge.$cmd command: { count: "user", fields: null, query: { display_name: /(?i)ctsa/i } } ntoreturn:1 reslen:48 7339ms Wed Oct 3 18:55:11 [conn4131244] command pyforge.$cmd command: { count: "user", fields: null, query: { display_name: /(?i)ctsai/i } } ntoreturn:1 reslen:48 7184ms Wed Oct 3 18:55:19 [conn4131242] query pyforge.user query: { $query: { display_name: /(?i)ctsa/i }, $orderby: { username: 1 } } nscanned:409119 nreturned:1 reslen:350 8146ms Wed Oct 3 18:55:19 [conn4131244] query pyforge.user query: { $query: { display_name: /(?i)ctsai/i }, $orderby: { username: 1 } } nscanned:409119 nreturned:1 reslen:350 7953ms
Can't add an index on the query as-is. Possibly optimize with a smarter first-run query that is anchored and case-sensitive.
allura:cj/5047