home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
SQLiteDatabase Plugin for MP2
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="MJGraf" data-source="post: 1028424" data-attributes="member: 17886"><p>The more I test around, the more I think the database itself is by far fast enough and the speed problems stem from somewhere else. But so far this is only a gut feeling - Let's first describe my further tests:</p><p></p><p><u><strong>Connection Test</strong></u></p><p>What I do is a fresh import of my test music collection. As described above, I close my MP2 client as soon as I have added the share and the import runs. After the import has completed, I restart the MP2 server, start up the MP2 client and see what happens in the SQLDebug.log. When A client connects, there are apparently three SQL statements executed:</p><p></p><p><u>SQL1 (Update)</u></p><p>[CODE]</p><p>UPDATE ATTACHED_CLIENTS SET LAST_HOSTNAME = @LAST_HOSTNAME,</p><p> LAST_CLIENT_NAME = @LAST_CLIENT_NAME</p><p>WHERE</p><p> SYSTEM_ID = @SYSTEM_ID</p><p>-------------------------------------------------------</p><p>"LAST_HOSTNAME" [String]: 'MP2Client.fritz.box'</p><p>"LAST_CLIENT_NAME" [String]: 'MediaPortal 2 client'</p><p>"SYSTEM_ID" [String]: 'f3feaa94-a92c-4ba1-b841-aa617dadefe9'</p><p>[/CODE]</p><p><u>SQL2 (Attached Clients):</u></p><p>[CODE]</p><p>SELECT</p><p> SYSTEM_ID,</p><p> LAST_HOSTNAME,</p><p> LAST_CLIENT_NAME</p><p>FROM ATTACHED_CLIENTS</p><p>[/CODE]</p><p><u>SQL3 (Shares)</u></p><p>[CODE]</p><p>SELECT</p><p> SHARE_ID,</p><p> SYSTEM_ID,</p><p> BASE_RESOURCE_PATH,</p><p> NAME</p><p>FROM SHARES</p><p>WHERE</p><p> SYSTEM_ID=@SYSTEM_ID</p><p>-------------------------------------------------------</p><p>"SYSTEM_ID" [String]: 'f3feaa94-a92c-4ba1-b841-aa617dadefe9'</p><p>[/CODE]</p><p>The first one (SQL1 (Update)) apparently updates one row in a table, which most likely only has a few rows equaling the number of MP2 Clients you have in your network. The second one reads all the rows in that table again and the third one reads all the shares available in the MP2 system. All queries should really execute quickly, since there is not much data to read or update and they do:</p><p></p><p>SQL1 (Update): 1 ms</p><p>SQL2 (Attached Clients): 0 ms</p><p>SQL3 (Shares): 0 ms</p><p></p><p>As mentioned, this is the result with a 1.7GB database. So I can't really see how this could slow down the connection process of the MP2 Client to the MP2 Server. So I guess we will have to wait for Lehmden's SQLDebug.Logs to get more insight in this problem.</p></blockquote><p></p>
[QUOTE="MJGraf, post: 1028424, member: 17886"] The more I test around, the more I think the database itself is by far fast enough and the speed problems stem from somewhere else. But so far this is only a gut feeling - Let's first describe my further tests: [U][B]Connection Test[/B][/U] What I do is a fresh import of my test music collection. As described above, I close my MP2 client as soon as I have added the share and the import runs. After the import has completed, I restart the MP2 server, start up the MP2 client and see what happens in the SQLDebug.log. When A client connects, there are apparently three SQL statements executed: [U]SQL1 (Update)[/U] [CODE] UPDATE ATTACHED_CLIENTS SET LAST_HOSTNAME = @LAST_HOSTNAME, LAST_CLIENT_NAME = @LAST_CLIENT_NAME WHERE SYSTEM_ID = @SYSTEM_ID ------------------------------------------------------- "LAST_HOSTNAME" [String]: 'MP2Client.fritz.box' "LAST_CLIENT_NAME" [String]: 'MediaPortal 2 client' "SYSTEM_ID" [String]: 'f3feaa94-a92c-4ba1-b841-aa617dadefe9' [/CODE] [U]SQL2 (Attached Clients):[/U] [CODE] SELECT SYSTEM_ID, LAST_HOSTNAME, LAST_CLIENT_NAME FROM ATTACHED_CLIENTS [/CODE] [U]SQL3 (Shares)[/U] [CODE] SELECT SHARE_ID, SYSTEM_ID, BASE_RESOURCE_PATH, NAME FROM SHARES WHERE SYSTEM_ID=@SYSTEM_ID ------------------------------------------------------- "SYSTEM_ID" [String]: 'f3feaa94-a92c-4ba1-b841-aa617dadefe9' [/CODE] The first one (SQL1 (Update)) apparently updates one row in a table, which most likely only has a few rows equaling the number of MP2 Clients you have in your network. The second one reads all the rows in that table again and the third one reads all the shares available in the MP2 system. All queries should really execute quickly, since there is not much data to read or update and they do: SQL1 (Update): 1 ms SQL2 (Attached Clients): 0 ms SQL3 (Shares): 0 ms As mentioned, this is the result with a 1.7GB database. So I can't really see how this could slow down the connection process of the MP2 Client to the MP2 Server. So I guess we will have to wait for Lehmden's SQLDebug.Logs to get more insight in this problem. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
SQLiteDatabase Plugin for MP2
Contact us
RSS
Top
Bottom