Folks,
The following query, when executed against the attached database using SQLite
3.30.1 (running on Windows OS) will take forever to execute. If we remove all
columns from both tables that are not actually used in the query, it is
executed in milliseconds.
SELECT COUNT(*) FROM
(SELECT
src.member_id src_id,
dst.member_id dst_id,
asg.contribution_percentage
FROM
mdl_assignments asg
INNER JOIN
mdl_member_instances src ON asg.source_mbi_id = src.id
INNER JOIN
mdl_member_instances dst ON asg.destination_mbi_id = dst.id
WHERE
src.period_scenario_id = 1 AND dst.period_scenario_id = 1) T
When testing the same query with older versions of SQLite we used in the past
(more than 6 years ago), the query also executed in milliseconds.
We have executed several different tests but could not figure out why this
query hangs on the latest version of SQLite but runs fast in older versions or
when we remove columns from the tables in the database.
Hope this can help you improve SQLite.
Thanks
Clovis Ribeiro
MyABCM
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users