今天看到一篇文章 - “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? ;)

mysql firebird 性能_Firebird, MySQL 与 PostgreSQL 代码质量对比相关推荐

  1. MySQL主从复制性能优化

    MySQL主从复制性能优化 MySQL的主从复制的基本原理是从库连接到主库,主库生成一个主库DUMP线程,该DUMP线程的主要任务是 一直挖掘binlog日志,然后发送到从库的IO线程,IO线程接收到 ...

  2. mysql转化为GaussDB,GaussDB(openGauss)宣布开源,性能超越 MySQL 与 PostgreSQL

    9 月 19 日,在华为 CONNECT 大会上,华为宣布将开源其 GaussDB 数据库,开源后命名为 openGauss. 图片来自OSCHINA社区 GaussDB 数据库是今年 5 月 15 ...

  3. mysql longtext db2_从 MySQL 或 PostgreSQL 迁移到 DB2 Express-C

    从 MySQL 或 PostgreSQL 迁移到 DB2 Express-C 用三个简单步骤迁移到 DB2 Vikram Khatri, Nora Sokolof, 和 Manas Dadarkar ...

  4. mysql geo_地理位置geo处理之mysql函数的详细介绍(附代码)

    本篇文章给大家带来的内容是关于地理位置geo处理之mysql函数的详细介绍(附代码),有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助. 目前越来越多的业务都会基于LBS,附近的人,外卖位 ...

  5. Mysql数据库性能调优面试大全经典分析

    1.为啥要死磕Mysql Mysql作为一款大众免费开源的关系型数据库软件,受到国内很多"穷屌丝"企业的热烈欢迎,看一下目前最新数据库排行,Mysql排在第二位,仅此于Oracle ...

  6. mysql geo 函数_【后端开发】地理位置geo处理之mysql函数的详细介绍(附代码)

    本篇文章给大家带来的内容是关于地理位置geo处理之mysql函数的详细介绍(附代码),有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助. 目前越来越多的业务都会基于LBS,附近的人,外卖位 ...

  7. Oracle 工程师离职并回踩:MySQL 糟糕透顶,强烈推荐 PostgreSQL

    整理 | 祝涛 出品 | CSDN(ID:CSDNnews) 如果你即将离职,你会做什么?抨击自己付出了五年心血的技术--这是Oracle公司前首席软件工程师.MySQL优化器团队成员Steinar ...

  8. Mysql 索引优化分析_如何优化MySQL的性能?从索引方面优化案例分析

    今天我们来讲讲如何优化MySQL的性能,主要从索引方面优化. 建表 //建表 CREATETABLEIFNOTEXISTSstaffs( idINTPRIMARYKEYAUTO_INCREMENT, ...

  9. mysql和redis统计网站活跃度,最代码网站用户私信列表采用mysql union查询优化为Redis查询的经验和相关代码片段分享...

    由于用户和私信的数据量逐渐增加,查询用户和其他用户的私信合并排重排序的sql语法给mysql带来了很大的压力,springdata jpa的hql查询语法如下:select id from (sele ...

最新文章

  1. 美国客户商城系统的校验JS脚本
  2. GRE核心词汇助记与精练-List10感觉,感情
  3. Python基础day05【函数(函数传参的两种形式、函数形参)、拆包、引用、可变与不可变类型、引用做函数参数注意点】
  4. NHibernate初探-SQLDialects
  5. 编写程序计算 sentence 中有多少个单词,并指出其中最长和最短的单词。如果有多个最长或最短的单词,则将它们全部输出。
  6. Spring:自动接线或不自动接线
  7. JS(Javascript)校验表单项的内容是否合规
  8. Java性能优化面试题汇总
  9. HDTunePro v5.00 硬盘专业工具(绿色版)
  10. 墨者学院 - 零基础学习手工SQL注入
  11. 超好用的mac虚拟机软件:VM虚拟机 mac中文版
  12. 计算机音乐谱大全告白气球,周杰伦《告白气球》钢琴曲谱
  13. 深大uooc学术道德与学术规范教育第十一章
  14. 计算机网络的super super easy 教程 | 基础 及 数据链路层
  15. Failed to check the status of the service. No provider available for the service【已解决】
  16. 活动二维码怎么制作?如何将活动内容做成二维码图片?
  17. java计算机毕业设计医院病历管理系统源程序+mysql+系统+lw文档+远程调试
  18. 告别百度网盘,安装自己的专属网盘——Cloudreve,不限制下载速度!
  19. 财务指标初步学习笔记
  20. 第一章:数据结构和算法

热门文章

  1. 使用SoapUI调用不同的安全WCF SOAP服务-基本身份验证,第二部分
  2. junit单元测试断言_简而言之,JUnit:单元测试断言
  3. akka2.5_发布Akka Toolkit 2.3
  4. TellDontAsk的扩展
  5. 高级java开发_适用于高级Java开发人员的十大书籍
  6. 配置HTTPS以与Servlet一起使用
  7. drools的guvnor_Drools Guvnor –管理访问
  8. hibernate脏数据_Hibernate性能提示:脏收集效果
  9. 使用Spring Integration进行消息处理
  10. 针对新手的Java EE7和Maven项目–第1部分–简单的Maven项目结构–父pom