Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15457881
D9315.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9315.diff
View Options
diff --git a/src/applications/diffusion/fact/PhabricatorFactLintEngine.php b/src/applications/diffusion/fact/PhabricatorFactLintEngine.php
--- a/src/applications/diffusion/fact/PhabricatorFactLintEngine.php
+++ b/src/applications/diffusion/fact/PhabricatorFactLintEngine.php
@@ -159,25 +159,22 @@
$raw_trends = queryfx_all(
$conn,
- 'SELECT stringA AS path, SUM(valueX) AS n
- FROM %T AS x
- WHERE factType = %s
- AND objectPHID = %s
- AND stringA IN (%Ls)
- AND epoch = (
- SELECT MAX(epoch)
- FROM %T AS a
- WHERE factType = %s
- AND objectPHID = %s
- AND a.stringA = x.stringA)
- GROUP BY path',
+ 'SELECT a.stringA AS path, a.valueX AS n
+ FROM %T AS a
+ INNER JOIN (
+ SELECT t.stringA, MAX(t.epoch) AS epoch
+ FROM %T AS t
+ WHERE t.factType = %s
+ AND t.objectPHID = %s
+ AND t.stringA IN (%Ls)
+ AND t.valueX != 0
+ GROUP BY t.stringA) AS x
+ ON x.stringA = a.stringA AND x.epoch = a.epoch',
$table_name,
- self::TYPE_LINT_COUNT_BY_PATH,
- $branch->getPHID(),
- $prefixed_paths,
$table_name,
self::TYPE_LINT_COUNT_BY_PATH,
- $branch->getPHID());
+ $branch->getPHID(),
+ $prefixed_paths);
$trends = array();
foreach ($raw_trends as $value) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 31, 7:47 PM (6 d, 20 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7722722
Default Alt Text
D9315.diff (1 KB)
Attached To
Mode
D9315: Improve performance of lint differencing query
Attached
Detach File
Event Timeline
Log In to Comment