Вот тут я сравнивал MongoDB и MySQL в Ruby и результат не сильно меня обрадовал, хотя на MongoDB возлагаю большие надежды.
Я провел некоторые дополнительные бенчмарки.
Скрипты для бенчмарков тут: http://github.com/latrommi/benchmarking
Результаты ниже.
----------------------------------------------------------------
For my English friends:
Some days ago I did some MongoDB benchmark tests.
Here is more extended version.
Benchmark scripts: http://github.com/latrommi/benchmarking
and results below.
----------------------------------------------------------------
Вывод один: это не значит, что MongoDB хуже MySQL, это значит, что для нее ещё не написано нормального, быстрого драйвера для Ruby.
Conclusion: no fast Ruby driver for MongoDB.
Показаны сообщения с ярлыком mysql. Показать все сообщения
Показаны сообщения с ярлыком mysql. Показать все сообщения
понедельник, 9 ноября 2009 г.
Mongo, Mysql, Ruby and PHP
вторник, 13 октября 2009 г.
MongoDB VS MySQL
Just insert test.
#!/usr/bin/ruby require 'rubygems' require 'benchmark' require 'mongo' require 'mysql' # init benchmark cycle def cycle 10000.times{ |i| doc = { "text" => "i am any text and a little tail with me: #{i}", "count" => i, "coords" => {"x" => 203 + i, "y" => 102 + i} } yield doc } end # init mysql mysql = Mysql.new('localhost', 'testuser', 'testpass', 'test') mysql.query("DROP TABLE IF EXISTS `insert_bm`") mysql.query("DROP TABLE IF EXISTS `insert_bm_coords`") mysql.query("CREATE TABLE `insert_bm_coords`( `id` int unsigned not null auto_increment, `x` int not null, `y` int not null, PRIMARY KEY (`id`) )") mysql.query("CREATE TABLE `insert_bm`( `id` int unsigned not null auto_increment, `text` varchar(255) not null, `count` int not null, `coords_id` int unsigned not null, PRIMARY KEY (`id`) )") # init mongodb mongo_db = Mongo::Connection.new.db("ololo_db") mongo_db.collection("beta").drop mongo = mongo_db.collection("beta") # do benchmarking Benchmark.bm {|x| x.report("mysql:") { cycle{|doc| mysql.query("INSERT insert_bm_coords(x,y) VALUES(#{doc["coords"]["x"]}, #{doc["coords"]["y"]})") mysql.query("INSERT insert_bm(text, count, coords_id) VALUES('#{doc["text"]}', #{doc["count"]}, #{mysql.insert_id()})") } } x.report("mongodb:") { cycle{|doc| mongo.insert(doc) } } }
Result:
10_000:
user system total real
mysql: 0.300000 0.150000 0.450000 ( 1.763819)
mongodb: 5.690000 0.680000 6.370000 ( 7.201129)
1_000_000:
user system total real
mysql: 30.960000 12.950000 43.910000 (179.318003)
mongodb:569.650000 18.410000 588.060000 (678.889538)
UPDATE: after installing C extension (`gem install mongo_ext`).
I'm confused. Can anybody explain it?
10_000:
user system total real
mysql: 0.280000 0.110000 0.390000 ( 1.679100)
mongodb: 3.110000 0.270000 3.380000 ( 4.089022)
1_000_000:
user system total real
mysql: 32.400000 13.030000 45.430000 (179.684186)
mongodb:326.150000 17.000000 343.150000 (423.631974)
Что-то тут не так, учитывая заявления о скорости MongoDB.
Кто-то может подтвердить или опровергнуть?
UPDATE: here is explanation: http://blog.knopkodav.ru/2009/11/mongo-mysql-ruby-and-php.html
пятница, 14 декабря 2007 г.
Data Recovery Toolkit for InnoDB
На заметку.
Data Recovery Toolkit for InnoDB.
Метки:
data recovery,
innodb,
mysql,
performance,
tools
понедельник, 10 декабря 2007 г.
Azzurri Clay Database Modeling for Eclipse
Полчаса возни и найден бесплатный, хороший Azzurri Clay Database Modeling for Eclipse.
На первый взгляд все очень даже неплохо, сумел сделать reverse engineering, имеет кучу опций.
Посмотрим каков он в деле. Ищем здесь по тэгам, если будут глюки :)
Метки:
clay,
database design,
eclipse,
mysql
MySQL Workbench bug
"The GRT environment for the Workbench could not be initialized. Please verify your installation."
Такое сообщение при запуске MySQL Workbench.
Лечится правкой файла /usr/share/mysql-gui/workbench/lua/Workbench.lua:
находим ~1686 строчку, правим
local lowestX= 999999999.0
local lowestY= 999999999.0
local highestX= 0.0
local highestY= 0.0
на
local lowestX= 999999999
local lowestY= 999999999
local highestX= 0
local highestY= 0
Взято здесь.
Там для фикса этого бага написано много вариантов, но для меня сработал именно этот.
Подписаться на:
Сообщения (Atom)
