views:

337

answers:

6

IMPORTANT NOTE: I recieved many answers and I thank you all. But all the answers are more comments than answers. My question is related on the number of roundtrips per RDBMS. An experienced person told me that MySQL has less roundtrips than Firebird. I would like that the answer stays in the same area. I agree that this is not the first thing to consider, there are many others (application design, network settings, protocol settings...), anyway I 'd like to recieve an answer to my question, not a comment. By the way I found the comments all very useful. Thanks.

When the latency is high ("when pinging the server takes time") the server roundtrips make the difference.

Now I don't want to focus on the roundtrips created in programming, but the roundtrips that occur "under the hood" in the DB engine+Protocol+DataAccessLayer.

I have been told that FireBird has more roundtrips than MySQL. But this is the only information I know.

I am currently supporting MS SQL but I'd like to change RDBMS, so to make a wise choice I would like to include also this point into "my RDBMS comparison feature matrix" to understand which is the best RDBMS to choose as an alternative to MS SQL.

So the bold sentence above would make me prefer MySQL to Firebird (for the roundtrips concept, not in general), but can anyone add informations?

And MS SQL where is it located? Is someone able to "rank" the roundtrip performance of the main RDBMS, or at least: MS SQL, MySql, Postegresql, Firebird (I am not interested in Oracle since it is not free, and if I have to change I would change to a free RDBMS).

Anyway MySql (as mentioned several times on stackoverflow) has a not clear future and a not 100% free license. So my final choice will probably dall on PostgreSQL or Firebird.

Additional info:

somehow you can answer my question by making a simple list like:

MSSQL:3;

MySQL:1;

Firebird:2;

Postgresql:2

(where 1 is good, 2 average, 3 bad). Of course if you can post some links where the roundtrips per RDBMSs are compared it would be great

Update:

I use Delphi and I plan to use DevArt DAC (UNIDAC), so somehow the "same" Data Access component is used, so if there are significant roundtrip differences they are due to the different RDBMS used.

Further update:

I have a 2 tier application (inserting a middle tier is not an option), so by choosing a RDBMS that is optimized "roundtrip-side" I have a chance to further improve the performance of the application. This kind of "optimization" is like "buy a faster internet connection" or "put more memory on the server" or "upgrade the server CPUs". Anyway also those "optimizations" are important.

+1  A: 

Sometimes the "roundtrips" are also in the protocol or data access layer, not the "DB engine"

Cade Roux
+1 for such an awesome avatar pic!!
used2could
ok, i will update my question, but if you know the answer please tell me.
+2  A: 

I can't give round trip details but i was in a very similar situation a while back when i was trying to find alternatives to MS SQL due to budgeting. myself and 4 others spent some time comparing MySQL, Postgres, and FireBird.

Having worked with MySQL for a long time we quickly ruled it out for most of our larger projects. The decision fell between Postgres and FireBird. One thing just starting off was the lack of popular support/documentation with FireBird in contrast to Postgres. Our bench tests always either had Postgres on top or on level with FireBird, never under. In terms of features; Postgres again answered our needs while FiredBird had us needing to come up with creative solutions.

Below is a feature comparison chart. i'll admit it is now a bit dated but still very helpful:

Here is also a long forum thread discussing the difference

Good luck!

used2could
Very nice answer even if it doesn't touch the roundtrip concept. Anyway from this it seems to me that PostgreSQL > Firebird, and I need to use it in an enterprise context, anyway knowing the roundtrip thing would be of added value.
Thanks for the cleanup edit Hugues!! Cheers!
used2could
+5  A: 

Why are you concentrating on roundtrips? Normally they shouldn't affect your performance unless you had a very slow and unreliable network. For example, the difference between ODBC and OLEDB drivers for any database is nearly an order of magnitude in favor of OLEDB.

If you go to either MySQL or Firebird using ODBC instead of OLEDB/ADO.NET drivers you incur an overhead several orders of magnituted greater than the roundtrips you might save.

Panagiotis Kanavos
I have a slow network because some clients are connected through VPN so roundtrips do matter. Moreover I plan to use DevArt drivers, so they shuold perform the same on the different RDBMS. Moreover I am not concentrating on roundtrips, I am just considering THIS PROBLEM TOO. Anyway I will edit again my question to specifiy that I use Delphi.
+1  A: 

I will not rank the client-server DBMS's from the roundtrips side. There are a lot of options to make one DBMS the best (ask SQL Server to use the default cursor), and other the worse (create an Oracle cursor with nested datasets).

What you are looking for is, probably, the general approach, oriented on the trafic minimization and the independent work of a client from a server. That are the middle-tier data access libraries.

So, if your application is so sensitive to the trafic optimization, then look for such libraries like the DataAbstract, kbmMW or ThinDAC.

oodesigner
I think this is a very smart post, but DataAbstract is not the solution for me because I don't have a middle tier and inserting a middle tier im my application is like inserting a new floor in a house (it would cost more than rebuilding the house). So even if you are right I would still leave the question unanswered since I am really interested in the number of round trips. If this can improve the performance of my own application why shouldn't I care about it?
If you are ready to choose between **completely** different DBMS, then I does not see the issue to choose between standard client-server and mtier approach. But you can choose practically any one listed DBMS and use it properly. For example, do not call "describe" for a cursor, that will minimize roundtrips. For PgSQL - use binary protocol, that will produce much less trafic. Etc.
oodesigner
The fact I cannot go for ntier is becuase I am working on a huge legacy application, for sure if I had to write for scratch I will first buy I dataabstract license and then start thinking on the architecture. Thanks for the hints.
+4  A: 

How your application is coded and how and when data are accessed and transferred have a much greater impact in slow connection or high latency situations than the db network protocol itself. Some database protocols may be tuned to better work in uncommon scenarios, i.e. increasing or decreasing the the data packet size. You may also encounter slow down at the TCP/IP layer itself, which could require TCP/IP tuning as well.

ldsandon
Yes sure, anyway my question is really on roundtrips. Which is the RDBMS that uses the minimum number of round trips for executing a task (i.e. the execution of a select statement)?
IMHO that's a useless informations. It really depends on how the network protocol is designed, the average packet size for your application (the average side of your rows, how many rows are retrieved in average, etc.). A protocol wich uses less roundtrips but also smaller packets in a high latency scenario can be slower than another using little more roundtrips but bigger packets, because the first one has to send more packets to transfer the same amount of data. Also remember TCP may fragment your data, and need to wait to reassemble them, the TCP window and MTU size play a role as well
ldsandon
Ok, somehow what I am searching for is a low level detail that cannot really make the difference in my scenario. So I accept this as answer.
+3  A: 

Until v2.1, Firebird certainly creates more traffic than MS SQL Server. I have a friend which developed a MSSQL C/S application here in Brazil where the db is hosted in a datacenter. The client apps runs from many stores directly connecting on server over VPN/Internet using end-user broadband connections (1Mbps, mostly) for 5+ years and no trouble with it. The distances involved range from few hundred to thousands of kilometers from datacenter.

After v2.1, I can't figure out if this remains true, because I haven't made a fair comparison since and Firebird's remote protocol had been changed to optimize network traffic on slow connections. More on FirebirdSQL site.

Can't say on PostGres ou MySQL, since I didn't used any.

Fabricio Araujo
Thanks a lot for the information on Firebird and MS SQL. I will write it in my feature comparison matrix.
The network protocol in Firebird 2.5 is much more improved vs the one in Firebird 2.1 or older So i guess if you choose to beat the mssql then choose Firebrid 2.5 for network access http://asfernandes.blogspot.com/2009/07/network-latency-influence-on-firebird.htmlOld protocol: 55.5sNew protocol: 18.5s
Mariuz