Recent

Author Topic: [SOLVED] ZeosLib vs Native SQLdb  (Read 7713 times)

DeBritto

  • Jr. Member
  • **
  • Posts: 68
[SOLVED] ZeosLib vs Native SQLdb
« on: June 23, 2016, 04:19:13 am »
I'm developing an application with Free Pascal 3.0+Lazarus 1.6+Firebird 2.5. At this moment I'm accessing the database with the lazarus native SQL DB components. I would like to know if I'll gain performance using ZeosLib.

Anyone has some experience with this? I need this information before I start to change all the code. Any other suggestions? P.S. The application is Open Source.
« Last Edit: June 23, 2016, 10:32:44 pm by DeBritto »

nicknikos

  • Newbie
  • Posts: 3
Re: ZeosLib vs Native SQLdb
« Reply #1 on: June 23, 2016, 06:42:37 am »
I have the same question too. Anyone please?

Zoran

  • Hero Member
  • *****
  • Posts: 1990
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: ZeosLib vs Native SQLdb
« Reply #2 on: June 23, 2016, 08:30:42 am »
I do not think that you'll see much performance difference between the two.

The difference is in usage - Zeos has a bit different approach. I find Zeos easier to use, but I can't say that it is anything more than just the taste.

Also, I think that a Delphi programmer who is coming from ADO or BDE will find Zeos easier to use.

However, if you have already working application with SqlDb, you probably already know the behaviour of SqlDB well, then probably there is no reason for you to switch to Zeos.
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

rvk

  • Hero Member
  • *****
  • Posts: 7063
Re: ZeosLib vs Native SQLdb
« Reply #3 on: June 23, 2016, 09:29:50 am »
I would like to know if I'll gain performance using ZeosLib.
I saw you other question about Firebird in a high latency network... I think you are probably better of optimizing your database and queries. Firebird is not known for it's excellence in high latency network so you really need to be careful how you construct your queries. You also need to make sure you have good/correct indexes.

If the performance is still not what you expect you could always go the multi-tier route.

Graeme

  • Hero Member
  • *****
  • Posts: 1527
    • Graeme on the web
Re: ZeosLib vs Native SQLdb
« Reply #4 on: June 23, 2016, 12:15:22 pm »
I would like to know if I'll gain performance using ZeosLib.
The tiOPF's test suite (over 1700+ unit tests) do some database performance capturing while running it tests. Things like table iteration, retrieving metadata, inserts, updates, deletes, create tables, drop tables etc.... I just had a quick look at the results between SqlDB and Zeos, both talking to a Firebird database at the same server location. They were pretty much identical. Zeos was a fraction (milliseconds) faster at inserting data into tables. But that would not be enough to convince me to switch to Zeos. I think SqlDB is much better maintained code, and will always stay current with the latest FPC, and be ready on the day a FPC release is made.

Quote
Anyone has some experience with this? I need this information before I start to change all the code. Any other suggestions?
As my other reply to you mentioned, I suggest you take a serious look at tiOPF (http://www.tiopf.com). It would allow you to change database components at will, and even switch between a Client/Server model and a 3-tier model - all without changing a single line of code in your application. Fantastic for testing and answering questions like you just posted, and all without needing code changes.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

DeBritto

  • Jr. Member
  • **
  • Posts: 68
Re: ZeosLib vs Native SQLdb
« Reply #5 on: June 23, 2016, 10:32:15 pm »
Hi Graeme, Zoran and rvk,
Thanks for all the comments. I'll stick to SQLdb it's really good to know that it follows the Lazarus/FP line of development closely. For the future I'll try to applu tiOPF Framework. But I'll have to learn how to use it first and It will take time... a lot...
Thanks

Graeme

  • Hero Member
  • *****
  • Posts: 1527
    • Graeme on the web
Re: ZeosLib vs Native SQLdb
« Reply #6 on: June 24, 2016, 01:06:02 am »
But I'll have to learn how to use it first and It will take time... a lot...
It might look more scary than it really is.  :)  For a nice introduction to tiOPF I suggest reading the first 3 chapters of the Concept Manual on the website. This often makes developers better understand tiOPF. There are also a lot of demos, and purposely designed so each one shows one specific feature - making it much easier to learn. I also recommend you join the official support newsgroup where you can browse nearly 16 years of knowledge or post any questions you have.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

DeBritto

  • Jr. Member
  • **
  • Posts: 68
Re: [SOLVED] ZeosLib vs Native SQLdb
« Reply #7 on: June 24, 2016, 05:34:31 am »
Hi Graeme,
Thank you for your encouragement. I'll follow your instructions.
Best regards

 

TinyPortal © 2005-2018