mysql firebird 性能_Firebird, MySQL 与 PostgreSQL 代码质量对比

今天看到一篇文章 - “Firebird, MySQL 与 PostgreSQL 代码质量对比”-  关于三个开源 RDBMS 的静态分析比较。

主要内容

A few words about the projects

Firebird

MySQL

PostgreSQL

PVS-Studio

Comparison criteria

Why "head-on" comparison is not a good idea

An alternative way

Review of bugs

Total analysis results

Troubles with clearing private data

No check for the pointer returned by malloc and other similar functions

The use of a potential null pointer

Potentially unsafe use of formatted-output functions

Other warnings mentioned in the article on vulnerabilities

Suspicious use of enumeration elements

Incorrect determination of memory-block size

Missing 'throw' keyword

Calling the wrong memory-deallocation operator

Summing it all up

最终比较结果

Summing up the demerit points, we get the following:

Firebird: 1 + 1 + 2 = 4 points.

MySQL: 3 + 1 + 2 + 2 + 2 + 2 = 12 points.

PostgreSQL: 3 points.

Remember: the fewer points, the better.And if you ask me (a person with a wicked taste), I'd prefer... MySQL! It has the most interesting bugs and it's the leader, which makes it a perfect choice for analysis!

Firebird and PostgreSQL are trickier. On the one hand, even a one-point margin counts; on the other hand, it's quite a small difference, especially because that point was given for a V768 warning of the medium-certainty level... But then again, the codebase of PostgreSQL is way larger, yet it issued four hundred warnings at its automatically generated code...

Anyway, to figure out which of the two projects, Firebird or PostgreSQL, is better, we'd have to do a more thorough comparison. For now, I put them on one podium place so no one is offended. Maybe one day we'll compare them again more carefully, but it will be quite a different story...

So, the code-quality rankings are as follows:

1 place - Firebird and PostgreSQL.

2 place - MySQL.

Please remember that any review or comparison, including this one, is subjective. Different approaches may produce different results (though it is mostly true for Firebird and PostgreSQL, but not for MySQL).

So what about static analysis? I hope you are convinced now that it is useful for detecting defects of various types. Want to find out if your codebase has any of those bugs? Then it's the right time to try PVS-Studio! You write perfectly clean code? Then why not check your colleagues' code? ;)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值