GnuCash
Contact   Instructions
Bug 772776 - VERY large queries (over 11000 fields in IN clause) slow down GnuCash
Summary: VERY large queries (over 11000 fields in IN clause) slow down GnuCash
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Backend - SQL (show other bugs)
Version: 2.6.x
Hardware: Other Windows
: Normal enhancement
Target Milestone: ---
Assignee: core
QA Contact: core
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks:
 
Reported: 2016-10-11 17:10 EDT by yenidai
Modified: 2020-06-01 15:25 EDT (History)
4 users (show)

See Also:


Attachments

Description yenidai 2016-10-11 17:10:14 EDT
I use gnucash for years and I observed, that Gnucash began slow down a bit every time when I use it. I've checked MySQL database logs (it is my backend) and I observed, that a Gnucash create very large queries against database , ex.
SELECT * FROM gnucash.splits
 WHERE guid IN ('fffe48649b5251b4782d3c8593041a57',..... + 11000 another guids)

Why Gnucash cannot  use subqueries ?
A query SELECT * FROM gnucash.transactions gives me all these guids and only 7 others.
Comment 1 yenidai 2016-10-11 17:22:00 EDT
Start up time: 58 sec.
Database mysql dump Size: 9MB
Environment: Windows 7 x64, Intel iCore 7 2,8GHz, 8GB RAM, everything on SSD disk.
Comment 2 John Ralls 2018-12-28 12:41:01 EST
I rewrote most of the load queries in 3.x to use subqueries instead of huge lists of guids. It didn't produce a big speedup for local servers but I suppose it might for a slow network connection.

See also bug 795753.

Note You need to log in before you can comment on or make changes to this bug.