> On Nov 12, 2014, at 6:51 AM, Vincent Habchi <[email protected]> wrote: > > the sqlite version installed on OS X machines has been bumped to 3.8.x in OS > X 10.10. This apparently had the unfortunate side (or collateral) effect of > plummeting performance of some requests (specifically, some Macports related > database operations now take forever while they were fairly quick on 10.9).
Yes, I ran into this in September and tracked down the problem. Yosemite is using SQLite 3.8.5. This includes the new query planner[1] that was added in 3.8. Which is great, but comes with a caveat: >> The [Next Generation Query Planner] is almost always better than the legacy >> query planner. However, there may exist legacy applications that unknowingly >> depend on undefined and/or suboptimal behavior in the legacy query planner, >> and upgrading to the NGQP on those legacy applications could cause >> performance regressions. They have a checklist[2] of how to troubleshoot performance problems. One of the causes is indexes whose primary keys have lots of repeated values, so they have to be linearly scanned — in my case I had an index whose primary key was a boolean value. Ouch. Improving the index fixed the problem. If you're using CoreData I'm not sure if you'll be able to fix your database schema, since presumably CoreData manages it and not you. So I'm not sure how you'd work around the problem. Good luck! —Jens [1] https://www.sqlite.org/queryplanner-ng.html [2] https://www.sqlite.org/queryplanner-ng.html#howtofix
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
