Hannes Roth wrote:
I don't want to publish that table I used to make that benchmark. So I
created some random data:
http://dl.magiccards.info/speedtest.tar.bz2
$db = sqlite_open("speedtest.sqlite");
$result = sqlite_query($db, "SELECT * FROM speedtest WHERE text5 LIKE
'%a%'");
include("MySQL.php");
$erg = mysql_query("SELECT * FROM speedtest WHERE text5 LIKE '%a%'");
MySQL: 0.13727307319641
SQLite: 0.17734694480896
I took your data and loaded it into SQLite and MySQL databases.
Then I create a script file that contains 100 instances of your
query. Here is what I get:
[EMAIL PROTECTED] bld]# time mysql drh <speed1.sql >/dev/null
real 0m25.585s
user 0m18.290s
sys 0m1.960s
[EMAIL PROTECTED] bld]# time ./sqlite test.db <speed1.sql >/dev/null
real 0m22.993s
user 0m13.870s
sys 0m9.120s
So in my test, SQLite is a little faster. Perhaps the difference
might be in a bad implementation of the SQLite bindings for Perl,
or perhaps the "mysql" command-line shell is less than optimal.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]