MySQL vs MsSQL – comparisons never end

Search for the title, and you will land in several sites, which will tell you the views of the author. In fact there may be hell lot of people who would tell you that one out performs the other. But in reality what does that mean ?. If one knows how to optimize the database server, the sql, and the code behind. The performance can be tuned to a factor that both are at par. Now that is a far fetched view. Just think of the real bare minimum hardware to handle 300 tables, with less than 50 having a million rows, and the rest having master data. The MsSQL server will need a min of dual core with 8G memory, whereas the mysql would run on a 2G Virtual Machine and even out perform the MsSQL server. Think of the SELECT …. LIMIT X,Y and the SELECT GROUP_CONCAT, the advantages when considering server side pagination as well as selections directly outputting JSON for ajax frontends.
Continue reading “MySQL vs MsSQL – comparisons never end”

Migration from MySQL to MSSQL our solutions – Continued

In the previous post, I had specified that a code analysis would be presented later on, which is happening now. Though I am not permitted to abstract the whole database abstraction, which would otherwise divulge the core business logic of the system too, I do expect that the following would be enough to guide a MySQL PHP developer to port his application to MSSQL 2005. Mostly the compatablities are maintained. But for the database design, we had to let away some of the wonderful features from MySQL.

We started by a code auditing and reworked the system such that we did not use any group_concat through out the system. Also all timestamp and datetime fields were changed to varchar(19) since we were already feeding those fields with the php function date’s return value or ‘now()’. But there was quite a handful of areas where we were using STR_TO_DATE and with different formats. So this had to be handled in its own way. And it is here we started our regular expression war path.
Continue reading “Migration from MySQL to MSSQL our solutions – Continued”

Migration from MySQL to MSSQL our solutions

Last post I did had all of my feelings, and despair, and now I am sure those were out of sheer negligence and mostly because I was unaware of the MS SQL product. Though I still do not agree with certain things like the row_count workaround for the limit feature, and escaping of quotes. But for our project we could more or less maintain a streamline by using the same code base for MySQL, SQLite3 and MSSQL 2005. Will try to explain this across a couple of posts.

Continue reading “Migration from MySQL to MSSQL our solutions”

Porting application from MySQL to MSSQL

At first I thought it should be a challenge, though I did not expect it to be too tough, since we were already using a custom db wrapper. Well it turned out to be well too heavy a nightmare. And there was situations where I even considered retiring from life. I pity those who are paying thousands of hard earned money to buy such filthy crap.
Continue reading “Porting application from MySQL to MSSQL”

Convert MySQL Database to SQLite3 Database

For a cd based time limited working copy, of one of our products, I decided to port our mysql application to sqlite3. Since we had about 70 tables, and all with optimized indexes, and about 24 user defined function 3 triggers and 12 procedures, normally anyone would have thought of simply getting along with the mysql system itself. But I wanted to face the challenge. Thanks to Rob Cameron for the shell script published on his blog RidingTheClutch, Convert a MySQL database to a SQLite3 database, which sparked my thoughts.
Continue reading “Convert MySQL Database to SQLite3 Database”