{"id":1422,"date":"2018-01-19T19:22:49","date_gmt":"2018-01-19T19:22:49","guid":{"rendered":"http:\/\/goofy-trucks.flywheelsites.com\/optimizing-postgresql\/"},"modified":"2018-01-19T19:24:46","modified_gmt":"2018-01-19T19:24:46","slug":"optimizing-postgresql","status":"publish","type":"post","link":"https:\/\/phpbuilder.com\/optimizing-postgresql\/","title":{"rendered":"Optimizing Postgresql"},"content":{"rendered":"<div class=\"phpbuilder-content\">\n<div class=\"phpbuilder-meta\">\n<div class=\"\">By PHP Builder Staff<\/div>\n<div class=\"\">on August 21, 2001<\/div>\n<\/p><\/div>\n<div id=\"overflow-content\">\n<div class=\"articlePara\">\nEricson Smith<\/div>\n<div class=\"articlePara\">\nFollowing <a href=\"tim20000705.html\" target=\"_blank\">Tim<br \/>\nPerdue&#8217;s excellent article on the comparison between MySQL<br \/>\nand Postgresql<\/a>, I  decided to take a shot at installing and using this<br \/>\ndatabase. For most of our work I use MySQL and will continue to do so,<br \/>\nbecause of its ease of use and unrivaled select query speed, and also<br \/>\nbecause there is no point in trying to mess around with production<br \/>\nsystems that already work fine.<\/div>\n<div class=\"articlePara\">\nBut some new projects suffered greatly from MySQL&#8217;s table locking<br \/>\nfeature when I needed to update data (which I do a lot). Here are my<br \/>\nadventures in setting up a Postgresql database server.<\/div>\n<div class=\"articlePara\">\nOur configuration for a dedicated Postgresql server was:<\/div>\n<div class=\"articleList\">\n<ul>\n<li>Redhat 7.1<\/li>\n<li>Dual PIII 650Mhz System<\/li>\n<li>512MB RAM<\/li>\n<li>18Gig SCSI drive for the postgresql data partition<\/li>\n<\/ul>\n<\/div>\n<h2>Downloading and Installing<\/h2>\n<div class=\"articlePara\">\nI downloaded and installed the 7.1.2 RPM&#8217;s from http:\/\/postgres.org<br \/>\nwithout any trouble. For a server installation, I only installed:<br \/>\npostgresql-server and postgresql-7.1.2 (base).<\/div>\n<div class=\"articlePara\">\nI then started the server up and running by executing:<\/div>\n<div class=\"example\">\n\/etc\/init.d\/postgresql start<\/div>\n<div class=\"articlePara\">\nA small sized database was ported from MySQL (three tables totaling about<br \/>\n5000 records).  I created sufficient indexes for postgresql&#8217;s optimizer<br \/>\nto use, and modified our C application to use the postgresql C client<br \/>\ninterface for a small CGI program that would brutally query this table.<br \/>\nThis small CGI program receives thousands of queries per minute.<\/div>\n<\/div>\n<p><\/p>\n<div style=\"float: left; padding:15px; color:#17AAF3\">\n<div style=\"background-color:#B6E5FC; font-size:16px; margin-top:1px; padding:1px 4px 1px 4px; color:#000; font-style:bold; float:left;\">1<\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"smith200108214658.html?page=2\">2<\/a> <\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"smith200108219ba9.html?page=3\">3<\/a> <\/div>\n<div style=\"float:left; padding:2px;\"><a class=\"paginationPageLink\" href=\"smith200108214658.html?page=2\">Next Page \u00bb<\/a><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I decided to take a shot at installing and using this database. For most of our work I use MySQL and will continue to do so, because of its ease of<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1422","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/comments?post=1422"}],"version-history":[{"count":1,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1422\/revisions"}],"predecessor-version":[{"id":3281,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1422\/revisions\/3281"}],"wp:attachment":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/media?parent=1422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/categories?post=1422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/tags?post=1422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}