jmon Well-Known Member Licensed User Longtime User Sep 20, 2016 #1 Hello, I am using jRDC2 with SQLite. I have already set my SQLite db in PRAGMA journal_mode = wal: https://www.b4x.com/android/forum/t...ent-access-to-sqlite-databases.39904/#content but I read here: https://www.b4x.com/android/forum/t...ate-your-own-back-end-database.31616/#content that I should set the min & max pool size to 1: Code: Dim jo As JavaObject = pool jo.RunMethod("setMaxPoolSize", Array(1)) jo.RunMethod("setMinPoolSize", Array(1)) Is this correct? Because in my tests, that appeared to slow down the jRDC server. If I leave the default value of the pool, it returns results faster when I do multiple queries. Also, any other tweaks I could perform to improve the performance? For example, is there a way to cache queries? Thanks for your help
Hello, I am using jRDC2 with SQLite. I have already set my SQLite db in PRAGMA journal_mode = wal: https://www.b4x.com/android/forum/t...ent-access-to-sqlite-databases.39904/#content but I read here: https://www.b4x.com/android/forum/t...ate-your-own-back-end-database.31616/#content that I should set the min & max pool size to 1: Code: Dim jo As JavaObject = pool jo.RunMethod("setMaxPoolSize", Array(1)) jo.RunMethod("setMinPoolSize", Array(1)) Is this correct? Because in my tests, that appeared to slow down the jRDC server. If I leave the default value of the pool, it returns results faster when I do multiple queries. Also, any other tweaks I could perform to improve the performance? For example, is there a way to cache queries? Thanks for your help
Erel B4X founder Staff member Licensed User Longtime User Sep 20, 2016 #2 jmon said: Is this correct? Click to expand... Yes. There should only be a single connection at a time. The performance should be still quite fast: https://www.b4x.com/android/forum/threads/server-performance-measures.37502/#post-238853 jmon said: For example, is there a way to cache queries? Click to expand... This is the responsibility of the SQL engine. You can extend jRDC and cache common query results. I recommend you to try first without it. The most important optimization is to use indices correctly. Upvote 0
jmon said: Is this correct? Click to expand... Yes. There should only be a single connection at a time. The performance should be still quite fast: https://www.b4x.com/android/forum/threads/server-performance-measures.37502/#post-238853 jmon said: For example, is there a way to cache queries? Click to expand... This is the responsibility of the SQL engine. You can extend jRDC and cache common query results. I recommend you to try first without it. The most important optimization is to use indices correctly.
jmon Well-Known Member Licensed User Longtime User Sep 20, 2016 #3 Erel said: The most important optimization is to use indices correctly. Click to expand... Thank you, I will do that. I'm doing some performance tests, and I can insert 10K rows in 900ms with jRDC2, but on a local network. Querying a quite complex statement with multiple JOINs, I get the result in 500ms. Querying a simple statement, I get the result in 60ms. So that seems quite good. Upvote 0
Erel said: The most important optimization is to use indices correctly. Click to expand... Thank you, I will do that. I'm doing some performance tests, and I can insert 10K rows in 900ms with jRDC2, but on a local network. Querying a quite complex statement with multiple JOINs, I get the result in 500ms. Querying a simple statement, I get the result in 60ms. So that seems quite good.