What happens.... A friend ask me to get the data from an site for him. It was sample so I chose to to this with his favorite database engine: MySql. I create the robot, I runned it. In this time I saw that my computer works slowly. I finished it, i give to my my friend the database and after that he cause me to a fight, a SEO fight. Each of us should create an application that will publish that data on the web and who get more money wins. I accept this with one condition: we can use any techonlogy that we want. So I create a little application that moves the data from MySQL to MSSql 2005 Express.
In this moment I realize why my computers goes slowly during the robot running. If MSSql is using a little percent from processor on MySql the processor was ussed constant at 30%. That is very bad!
It is very bad because MySql has doit two instructions: select top 1 * from x where flag is true and update x set processed = 1 where id = @id. In this time MSSql server was doit one insert operation, and other 5-6 insert operations using the id from the 1st insert.
Is there such a big diference? I know that update command consumes more resurces but....such a big diference?
The final conclusions:
- MySql is working hard on the processor part. So when you thinck an aplication you could thinck at this.
- MSSql use a lot of RAM memory but I thinck that this isn't a problem with the ram prices.
- MySql has no limitations on the database size. Howewer, in aprevisous use of this database server I see that on a big database (10G if I remembet good) this server work to hard, or it doesn't working.
- MSSql is limited to 4 giga on database size. Generally this is not a problem...but thinck also at this ... Also there are and other limitations.
- Speed of command execution, is biger on MSSql, in general, than on MySql.
Here you can see the processor work on this two servers. This takes to me 10 Hours, for 70 000 data rows (only text, the pictures was saved on the hdd). Also when I have execute an command into the servers clients (ssmsee for MSSql and Heidi for MySql) there was some horrible results on the MySql side: timeout and a long time to count a number of 2-30000 rows; here MSSql has doit a good job; One moment i belive that this two cann't be compared; anyway the limitations is the only price that you have to pay for MSSql 2005 Express; in MySql you pay with the application speed: this is ugly.

MySql

0 comments:
Post a Comment