{"id":3257,"date":"2013-03-13T04:38:37","date_gmt":"2013-03-12T18:38:37","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=3257"},"modified":"2013-03-06T14:53:39","modified_gmt":"2013-03-06T04:53:39","slug":"which-is-bigger-mysql-or-postgresql","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/13\/which-is-bigger-mysql-or-postgresql\/","title":{"rendered":"Which is bigger: MySQL or PostgreSQL?"},"content":{"rendered":"<p>From my previous posts, we have some numbers (excluding NDB) for the size of MySQL, so what about PostgreSQL? Here, I used PostgreSQL git trunk and classing things in the contrib\/ directory as plugins. I put the number of lines of code in the src\/backend\/storage directory down as storage engines LoC but did not count it as non-kernel code.<\/p>\n<table>\n<thead>\n<tr>\n<td><strong>Version<\/strong><\/td>\n<td><strong>Total LoC<\/strong><\/td>\n<td><strong>Plugin LoC<\/strong><\/td>\n<td><strong>Storage Engines LoC<\/strong><\/td>\n<td><strong>Remaining (kernel)<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>MySQL 5.5.30<\/td>\n<td>858,441<\/td>\n<td>2,706<\/td>\n<td>171,009<\/td>\n<td>684,726 (79% kernel)<\/td>\n<\/tr>\n<tr>\n<td>MySQL 5.6.10<\/td>\n<td>1,049,344<\/td>\n<td>29,122<\/td>\n<td>236,067<\/td>\n<td>784,155 (74% kernel)<\/td>\n<\/tr>\n<tr>\n<td>MariaDB 5.5<\/td>\n<td>1,142,118<\/td>\n<td>11,781<\/td>\n<td>304,015<\/td>\n<td>826,322 (72% kernel)<\/td>\n<\/tr>\n<tr>\n<td>Drizzle trunk<\/td>\n<td>334,810<\/td>\n<td>31,150<\/td>\n<td>130,727<\/td>\n<td>172,933 (51% kernel)<\/td>\n<\/tr>\n<tr>\n<td>PostgreSQL trunk<\/td>\n<td>648,691<\/td>\n<td>61,934<\/td>\n<td>17,802<\/td>\n<td>586,757 (90% kernel)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>What we can see is that the PostgreSQL kernel size is actually smaller than any recent MySQL version (5.1 was slightly smaller). This is rather interesting as it is generally thought that PostgreSQL does <strong>more<\/strong> than MySQL. What&#8217;s more telling is that total code size, <strong>PostgreSQL is about half of MySQL 5.6 or MariaDB 5.5<\/strong>. Only Drizzle ends up being smaller, which makes sense as it &#8220;does less&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From my previous posts, we have some numbers (excluding NDB) for the size of MySQL, so what about PostgreSQL? Here, I used PostgreSQL git trunk and classing things in the contrib\/ directory as plugins. I put the number of lines &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2013\/03\/13\/which-is-bigger-mysql-or-postgresql\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[76,75,14],"tags":[70,340,628,342],"class_list":["post-3257","post","type-post","status-publish","format-standard","hentry","category-code","category-drizzle-work-et-al","category-mysql","tag-drizzle","tag-mariadb","tag-mysql","tag-postgresql"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-Qx","jetpack-related-posts":[{"id":3237,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/08\/mysql-modularity-are-we-there-yet\/","url_meta":{"origin":3257,"position":0},"title":"MySQL modularity, are we there yet?","author":"Stewart Smith","date":"2013-03-08","format":false,"excerpt":"MySQL is now over four times the size than it was with MySQL 3.23. This has not come in the shape of plugins. Have we improved modularity over time? I decided to take LoC count for plugins and storage engines (in the case of Drizzle, memory, myisam and innobase are\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3254,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/12\/is-mysql-bigger-than-linux\/","url_meta":{"origin":3257,"position":1},"title":"Is MySQL bigger than Linux?","author":"Stewart Smith","date":"2013-03-12","format":false,"excerpt":"I'm going to take the numbers from my previous post, MySQL Modularity, Are We There Yet? for the \"kernel\" size of MySQL - that is, everything that isn't a plugin or storage engine. For Linux kernel, I'm just going to use the a-bit-old git tree I have on my laptop.\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3242,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/07\/other-mysql-code-size\/","url_meta":{"origin":3257,"position":2},"title":"Other MySQL branch code sizes\u00ef\u00bb\u00bf\u00ef\u00bb\u00bf","author":"Stewart Smith","date":"2013-03-07","format":false,"excerpt":"Continuing on from my previous posts,\u00c2\u00a0MySQL code size over releases\u00c2\u00a0and\u00c2\u00a0MariaDB code size\u00c2\u00a0I've decided to also look into some other code branches. I've used the same methodology as my previous few posts: sloccount for C and C++ code only. There are also other branches around in pretty widespread use (if only\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3664,"url":"https:\/\/www.flamingspork.com\/blog\/2014\/02\/04\/ghosts-of-mysql-past-part-2\/","url_meta":{"origin":3257,"position":3},"title":"Ghosts of MySQL Past: Part 2","author":"Stewart Smith","date":"2014-02-04","format":false,"excerpt":"This continues on from my post yesterday and also contains content from my linux.conf.au 2014 talk (view video here). Way back in May in the year 2000, a feature was added to MySQL that would keep many people employed for many years - replication. In 3.23.15 you could replicate from\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1813,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/03\/12\/writing-a-storage-engine-for-drizzle-part-2-create-table\/","url_meta":{"origin":3257,"position":4},"title":"Writing A Storage Engine for Drizzle, Part 2: CREATE TABLE","author":"Stewart Smith","date":"2010-03-12","format":false,"excerpt":"The DDL code paths for Drizzle are increasingly different from MySQL. For example, the embedded_innodb StorageEngine CREATE TABLE code path is completely different than what it would have to be for MySQL. This is because of a number of reasons, the primary one being that Drizzle uses a protobuf message\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2447,"url":"https:\/\/www.flamingspork.com\/blog\/2012\/01\/23\/mysql-and-postgresql-cloud-offerings-linux-conf-au-2012-miniconf-talk-by-myself-and-selena\/","url_meta":{"origin":3257,"position":5},"title":"MySQL and PostgreSQL Cloud Offerings &#8211; linux.conf.au 2012 miniconf talk by myself and Selena","author":"Stewart Smith","date":"2012-01-23","format":false,"excerpt":"Selena and I gave a talk on the various issues of running databases \"in the cloud\" at the recent linux.conf.au in Ballarat. Video is up, embedded below:","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=3257"}],"version-history":[{"count":2,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3257\/revisions"}],"predecessor-version":[{"id":3259,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3257\/revisions\/3259"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=3257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=3257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=3257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}