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 1
MediaPortal 1 Talk
MySQL or MicrosoftSQL?
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="htpsd" data-source="post: 127975" data-attributes="member: 27262"><p>Hello Everybody,</p><p></p><p>I was wondering what database I should use. So I set up the server once with MSSQL and once with MySQL. The content of both databases should be exactly the same. I checked it for the Table "program". In both databases I importet the same data from Clickfinder. 7777 rows are in both databases.</p><p></p><p>Then I wrote a simple PHP Script wich makes 10.000.000 queries on the table "program". Once for MySQL and once for MSSQL.</p><p></p><p>I ran the script for each database about 10 times to be shure that the result is right.</p><p></p><p>The MSSQL database needed 740 seconds to execute the query.</p><p>The MySQL database needed 600 seconds to execute the query.</p><p></p><p>Query was: "select * from program" .</p><p></p><p></p><p>Than I changed the script to insert data into the databases. Again I choosed the table "program". I simply added some trash data. The script added 10.000 entries in both databases.</p><p></p><p>The MSSQL database needed 240 seconds to execute the query.</p><p>The MySQL database needed 255 seconds to exevute the query.</p><p></p><p></p><p><strong>--> So for reading MySQL is faster for TVengine3 - for writing MSSQL.</strong></p><p><strong>In my configuration with 4 clients the TVservice reads more data from database than it writes into it - so I decided to use MySQL.</strong></p><p></p><p></p><p>Additional info:</p><p></p><p>-Both databases were set up like its written in the TVengine3 wiki.</p><p>-This performance test is only for the TVengine Database correct. Other databases could give other results.</p><p>-The tests run at the same machine. Only Apache and the specific database were running.</p><p>-The results are averages from about 10 results.</p><p>-The Server is running MySQL 5.1, MSSQL 2005 Express, PHP5.1 on Dual Core AMD 64 4600+ running on Windows 2003 Enterprise x86 and 4 GB Ram.</p><p></p><p>Queries for MySQL (MSSQL is the same code, but mssql_connect)</p><p></p><p>[CODE]<?php</p><p></p><p>$host = 'localhost';</p><p>$db = 'tvlibary';</p><p>$user = 'root';</p><p>$pw = '***';</p><p></p><p>set_time_limit(3600);</p><p>$link = mysql_connect($host, $user, $pw);</p><p>if (!$link) {</p><p> die('keine Verbindung möglich: ' . mysql_error());</p><p>}</p><p>echo 'Verbindung erfolgreich<br><br>';</p><p>$que = mysql_select_db($db);</p><p>$t1 = time();</p><p>//Queries</p><p>$i=1;</p><p>while ($i <= 10000000) </p><p>{</p><p> mysql_query("select * from program");</p><p> $i++;</p><p>}</p><p>$t2 = time();</p><p>$t3 = $t2-$t1;</p><p></p><p>echo $t3;</p><p>?>[/CODE]</p></blockquote><p></p>
[QUOTE="htpsd, post: 127975, member: 27262"] Hello Everybody, I was wondering what database I should use. So I set up the server once with MSSQL and once with MySQL. The content of both databases should be exactly the same. I checked it for the Table "program". In both databases I importet the same data from Clickfinder. 7777 rows are in both databases. Then I wrote a simple PHP Script wich makes 10.000.000 queries on the table "program". Once for MySQL and once for MSSQL. I ran the script for each database about 10 times to be shure that the result is right. The MSSQL database needed 740 seconds to execute the query. The MySQL database needed 600 seconds to execute the query. Query was: "select * from program" . Than I changed the script to insert data into the databases. Again I choosed the table "program". I simply added some trash data. The script added 10.000 entries in both databases. The MSSQL database needed 240 seconds to execute the query. The MySQL database needed 255 seconds to exevute the query. [B]--> So for reading MySQL is faster for TVengine3 - for writing MSSQL. In my configuration with 4 clients the TVservice reads more data from database than it writes into it - so I decided to use MySQL.[/B] Additional info: -Both databases were set up like its written in the TVengine3 wiki. -This performance test is only for the TVengine Database correct. Other databases could give other results. -The tests run at the same machine. Only Apache and the specific database were running. -The results are averages from about 10 results. -The Server is running MySQL 5.1, MSSQL 2005 Express, PHP5.1 on Dual Core AMD 64 4600+ running on Windows 2003 Enterprise x86 and 4 GB Ram. Queries for MySQL (MSSQL is the same code, but mssql_connect) [CODE]<?php $host = 'localhost'; $db = 'tvlibary'; $user = 'root'; $pw = '***'; set_time_limit(3600); $link = mysql_connect($host, $user, $pw); if (!$link) { die('keine Verbindung möglich: ' . mysql_error()); } echo 'Verbindung erfolgreich<br><br>'; $que = mysql_select_db($db); $t1 = time(); //Queries $i=1; while ($i <= 10000000) { mysql_query("select * from program"); $i++; } $t2 = time(); $t3 = $t2-$t1; echo $t3; ?>[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Talk
MySQL or MicrosoftSQL?
Contact us
RSS
Top
Bottom