Faster query time but slower response time in 11.4 vs 10.3
0
votes
1
answer
510
views
I am trying to do a migration for a sever upgrade. The current live system is a Win 2016 server with MariaDB 10.3 on it. The new system is Win 2022 with MariaDB 11.4. Everything is virtual running on VMWare.
I have set up the new system, restored a backup of the live database and done some performance testing. I'm using the latest version of HeidiSQL to run my queries. In order to have a fair comparison I have set up a test VM which is Win 2022 and MariaDB 10.3. Both VMs are on the same host and have the same specs. And both are using the same restore point. Everything is the same except the MariaDB version.
What I'm seeing in profiler on Heidi is the query run time of my test query on the 11.4 VM is much shorter, around a a third of the time of the 10.3 test box. (around 0.2 vs 0.6). Which is great.
But the total query time reported by HeidiSQL is longer by around 0.7 sec. (Around 3 seconds on the 11.4 box and 2.3 seconds on the 10.3 box.) I have run the query multiple times so the data is in memory and I can get an average. Once the data is in memory the run times are fairly stable on both test VMs.
I'm using Solarwinds DBA (only against 11.4) and the majority of the time is recorded as "sending data", which seems to cover multiple things. But this is apparently the same with most queries, and because I can't find a way to drill down any further isn't very helpful.
I did find that switching on the profiler in HeidiSQL on the 11.4 box added around 0.5 secs to the total run time, which it didn't on the 10.3. So something has changed there between versions. (Heidi is the same version on both test VMs).
Does anyone know why I would be getting a faster query time but slower overall response time on 11.4? I can't really put the new server live knowing it is about 30% slower and also not knowing why!
I'm not a DBA and I've reached the limits of knowing where to look to find where the extra time is being used. It would appear to be environmental except I can't see anything to make the VMs behave differently.
The cache hit is 100%, there is no sign of slow disk activity, the queries are being run locally so no network involved.
Any ideas would be gratefully received.
Rich.
EDIT: Here is the SQL.
`
SELECT
todo.customer_requested 'Callback Requested',
app.id 'Client Lead ID',
(select cd.CodeName from theremortgagepeople.companydetails cd where cd.id = app.OwningCompanyId limit 1) 'Lead Owner',
concat(app.FirstName, ' ', app.LastName) 'Client',
(select tt.todoType from contacts.tmtodotype tt where tt.id = todo.todotype limit 1) 'Call Reason',
todo.duedate 'Due',
(select u.DisplayName from theremortgagepeople.user u where u.id = todo.user_id limit 1) 'Owner',
(select ls.Description from contacts.leadsource ls where ls.id = app.LeadSourceId limit 1) 'Lead Source',
app.CreatedDate 'Lead Loaded',
todo.completed_date 'Completed',
(select u.DisplayName from theremortgagepeople.user u where u.id = todo.completed_by limit 1) 'Completed By',
(select cr.reason from contacts.todoclosurereasons cr where cr.id = todo.closureReasonId limit 1) 'Completed Reason',
(select co.outcome from contacts.tmcalloutcome co where co.id = todo.calloutcome limit 1) 'Call Outcome',
(select tr.reason from contacts.tmturndownreason tr where tr.id = todo.turndownreason limit 1) 'Turndown Reason',
todo.createddate 'Created Date',
(select u.DisplayName from theremortgagepeople.user u where u.id = todo.createdby limit 1) 'Created By',
iq.ercDate,
(select co.outcome from contacts.tmcalloutcome co where co.id = todo.secondOutcomeId limit 1) 'Sec Outcome'
FROM contacts.tmtodolist todo
inner join contacts.applicant app on todo.applicant_id = app.id
left join contacts.initialquestions iq on app.id = iq.applicantId
where todo.completed
AND (todo.completed_date IS NOT NULL AND (CONVERT(todo.completed_date, date) >= '2024-07-01 00:00:00Z'))
AND (todo.completed_date IS NOT NULL AND (CONVERT(todo.completed_date, date) <= '2024-07-31 00:00:00Z'))
AND app.istest = false
AND (app.owningcompanyid is not null and app.owningcompanyid in (1,2,3))
order by todo.completed_date asc;
`
Asked by rb305798
(1 rep)
Sep 17, 2024, 12:00 PM
Last activity: Sep 20, 2024, 12:23 PM
Last activity: Sep 20, 2024, 12:23 PM