WHERE TBAV.BARSY_ID IN (1,194,314,134,376,164,346,284,361,344,224,254,391)
GROUPBY TBAV.ARTICLE_ID
) BAV USING (ARTICLE_ID)
WHERE
BA.PARENT_ID ISNULL
AND BA.PICTURE ISNOTNULL
AND BA.ARTICLE_ID IN ( SELECTDISTINCT ARTICLE_ID FROM b_article_cats )
AND BA.ARTICLE_ID IN ( SELECTDISTINCT IBA.ARTICLE_ID
FROM b_articles IBA
INNERJOIN b_availability IBAV USING (ARTICLE_ID)
LEFTJOIN (b_article_details IBAD
INNERJOIN b_article_detail_key_values IBADKV USING (DETAIL_ID) ) ON IBA.ARTICLE_ID = IBAD.ARTICLE_ID AND IBAD.KEY_ID = -1
WHERE (IBADKV.DETAIL_VALUE ISNULL
OR IBADKV.DETAIL_VALUE = ""
OR IBA.LAST_UPDATE > IBADKV.DETAIL_VALUE
OR IBAV.AMOUNT_LAST_UPDATE > IBADKV.DETAIL_VALUE
)
AND IBAV.BARSY_ID IN (1,194,314,134,376,164,346,284,361,344,224,254,391)
)
Using mariadb 10.4.10 binary the query would return something like:
173984 2018-11-01 13:10:25 0.000000000
174044 2018-11-01 13:10:25 0.000000000
.....
But if I upgrade the package it start returning:
173984 NULL NULL
174044 NULL NULL
....
I cannot provide recreation steps since the data is private, but I'm attaching the result from running ANALYZE on the query.
the result from 10.4.11 and 10.4.18 are identical, but I'm attaching both of them for completenes
Another interesing obervation.
If I comment/remove this row: AND BA.ARTICLE_ID IN ( SELECT DISTINCT ARTICLE_ID FROM b_article_cats )
the query starts working again.
It is interesing because those are filters on the result set and should only effect the number of rows returned. But it seams they influence on the subquery that is geting the max date and sum.
Anton Avramov
added a comment - - edited Another interesing obervation.
If I comment/remove this row: AND BA.ARTICLE_ID IN ( SELECT DISTINCT ARTICLE_ID FROM b_article_cats )
the query starts working again.
It is interesing because those are filters on the result set and should only effect the number of rows returned. But it seams they influence on the subquery that is geting the max date and sum.
People
Sergei Petrunia
Anton Avramov
Votes:
0Vote for this issue
Watchers:
1Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":738.1000001430511,"ttfb":208.79999995231628,"pageVisibility":"visible","entityId":98203,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"6a689b41-f591-4a3c-84e1-308cf53aa09a","navigationType":0,"readyForUser":809.5,"redirectCount":0,"resourceLoadedEnd":340.7000000476837,"resourceLoadedStart":216.10000014305115,"resourceTiming":[{"duration":3.299999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":216.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":216.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":219.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":3.299999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":216.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":216.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":219.79999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":90.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":216.5,"connectEnd":216.5,"connectStart":216.5,"domainLookupEnd":216.5,"domainLookupStart":216.5,"fetchStart":216.5,"redirectEnd":0,"redirectStart":0,"requestStart":223.29999995231628,"responseEnd":306.7000000476837,"responseStart":240.5,"secureConnectionStart":216.5},{"duration":124,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":216.70000004768372,"connectEnd":216.70000004768372,"connectStart":216.70000004768372,"domainLookupEnd":216.70000004768372,"domainLookupStart":216.70000004768372,"fetchStart":216.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":223.70000004768372,"responseEnd":340.7000000476837,"responseStart":241,"secureConnectionStart":216.70000004768372},{"duration":23.600000143051147,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":216.79999995231628,"connectEnd":216.79999995231628,"connectStart":216.79999995231628,"domainLookupEnd":216.79999995231628,"domainLookupStart":216.79999995231628,"fetchStart":216.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":224.10000014305115,"responseEnd":240.40000009536743,"responseStart":238.60000014305115,"secureConnectionStart":216.79999995231628},{"duration":34.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":216.90000009536743,"connectEnd":216.90000009536743,"connectStart":216.90000009536743,"domainLookupEnd":216.90000009536743,"domainLookupStart":216.90000009536743,"fetchStart":216.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":225.29999995231628,"responseEnd":251,"responseStart":250.5,"secureConnectionStart":216.90000009536743},{"duration":43,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":217,"connectEnd":217,"connectStart":217,"domainLookupEnd":217,"domainLookupStart":217,"fetchStart":217,"redirectEnd":0,"redirectStart":0,"requestStart":226.10000014305115,"responseEnd":260,"responseStart":259.5,"secureConnectionStart":217},{"duration":8.799999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":217.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":217.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":225.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":58.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":217.20000004768372,"connectEnd":217.20000004768372,"connectStart":217.20000004768372,"domainLookupEnd":217.20000004768372,"domainLookupStart":217.20000004768372,"fetchStart":217.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":231.10000014305115,"responseEnd":275.7000000476837,"responseStart":275.2000000476837,"secureConnectionStart":217.20000004768372},{"duration":9.800000190734863,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":217.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":217.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":227.10000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":56.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":217.40000009536743,"connectEnd":217.40000009536743,"connectStart":217.40000009536743,"domainLookupEnd":217.40000009536743,"domainLookupStart":217.40000009536743,"fetchStart":217.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":231.29999995231628,"responseEnd":273.7999999523163,"responseStart":272.90000009536743,"secureConnectionStart":217.40000009536743},{"duration":20.799999952316284,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":228.5,"connectEnd":236.29999995231628,"connectStart":236.29999995231628,"domainLookupEnd":236.29999995231628,"domainLookupStart":236.29999995231628,"fetchStart":228.5,"redirectEnd":0,"redirectStart":0,"requestStart":236.40000009536743,"responseEnd":249.29999995231628,"responseStart":247.5,"secureConnectionStart":236.29999995231628},{"duration":21.299999952316284,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":228.70000004768372,"connectEnd":228.70000004768372,"connectStart":228.70000004768372,"domainLookupEnd":228.70000004768372,"domainLookupStart":228.70000004768372,"fetchStart":228.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":237.20000004768372,"responseEnd":250,"responseStart":248.79999995231628,"secureConnectionStart":228.70000004768372},{"duration":190.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":513.2999999523163,"connectEnd":513.2999999523163,"connectStart":513.2999999523163,"domainLookupEnd":513.2999999523163,"domainLookupStart":513.2999999523163,"fetchStart":513.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":673.5,"responseEnd":703.6000001430511,"responseStart":703.1000001430511,"secureConnectionStart":513.2999999523163},{"duration":192.30000019073486,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":717.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":717.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":910.1000001430511,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":66,"responseStart":209,"responseEnd":229,"domLoading":212,"domInteractive":867,"domContentLoadedEventStart":867,"domContentLoadedEventEnd":909,"domComplete":1400,"loadEventStart":1400,"loadEventEnd":1401,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":849.7999999523163},{"name":"bigPipe.sidebar-id.end","time":850.6000001430511},{"name":"bigPipe.activity-panel-pipe-id.start","time":850.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":851.6000001430511},{"name":"activityTabFullyLoaded","time":927.4000000953674}],"measures":[],"correlationId":"444548adeba3e8","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":84,"dbReadsTimeInMs":9,"dbConnsTimeInMs":16,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Another interesing obervation.
If I comment/remove this row: AND BA.ARTICLE_ID IN ( SELECT DISTINCT ARTICLE_ID FROM b_article_cats )
the query starts working again.
It is interesing because those are filters on the result set and should only effect the number of rows returned. But it seams they influence on the subquery that is geting the max date and sum.