Linux Systems Administrator
Jupitermedia
US-AZ-Tucson

Justtechjobs.com Post A Job | Post A Resume

Optimizing Postgresql
Ericson Smith
Following Tim Perdue's excellent article on the comparison between MySQL and Postgresql, 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 use and unrivaled select query speed, and also because there is no point in trying to mess around with production systems that already work fine.
But some new projects suffered greatly from MySQL's table locking feature when I needed to update data (which I do a lot). Here are my adventures in setting up a Postgresql database server.
Our configuration for a dedicated Postgresql server was:
  • Redhat 7.1
  • Dual PIII 650Mhz System
  • 512MB RAM
  • 18Gig SCSI drive for the postgresql data partition
Downloading and Installing
I downloaded and installed the 7.1.2 RPM's from http://postgres.org without any trouble. For a server installation, I only installed: postgresql-server and postgresql-7.1.2 (base).
I then started the server up and running by executing:
/etc/init.d/postgresql start
A small sized database was ported from MySQL (three tables totaling about 5000 records). I created sufficient indexes for postgresql's optimizer to use, and modified our C application to use the postgresql C client interface for a small CGI program that would brutally query this table. This small CGI program receives thousands of queries per minute.
[ Next Page ]


Comments:
Upgrading Postgres 7.4 to 8.0.3nhan06/27/05 22:42
RE: connecting asa 6Mohan Prasad Ghimire03/23/05 01:44
RE: POSTGRESQL DOWN - HELP!vineeth12/13/04 07:14
Funcionar el template 1 de postgresql enWinxpZuleika11/19/04 09:05
recordset data incorrect after selectrob10/16/02 05:10
Serverjohn Iodence10/15/02 14:17
How to add module for postgresql?Vikas Singhal09/25/02 05:55
RE: PostgresQL - JOINsjosh goldberg08/26/02 20:01
Using Postgres with C !!!Javi08/11/02 10:44
POSTGRESQL DOWN - HELP!MARCIO CORREA07/31/02 12:32
RPMs vs SourceMartin Tsachev07/30/02 20:21
RE: postgres database connection with VisualBasicsam07/26/02 08:06
RE: PostgreSQL BackupJ.M. Goikoetxea07/25/02 21:15
PostgreSQL BackupKausik Halder07/16/02 05:20
postgres database connection with VisualBasicsekhar07/02/02 00:17
Postgresql vs mysqldudy rudianto07/01/02 03:48
postgresmauro beck05/20/02 15:24
help needed with postgres jdbc driver instabvol05/07/02 11:44
hosting provider wth PostgreSQLTonia Yee04/26/02 16:04
Error during backupTulasi04/20/02 04:32
Help needed on PostGres FunctionsSwaraj04/20/02 00:44
probleme connexion avec base de donneederouiche04/14/02 14:02
inquirementchakroun04/02/02 06:28
inquirementchakroun04/02/02 06:22
RE: error during copying .txt fileHano de la Rouviere03/20/02 06:26
RE: shmmax + shared_buffersJoek Hondius03/20/02 04:22
error during copying .txt fileTulasi03/19/02 05:16
RE: PostgresQL - JOINsmohan03/15/02 02:14
RE: shmmax + shared_buffersGB Clark03/14/02 01:22
Don't forget to vacuum analyze.Paul Joyce03/07/02 11:11
createlang pltclu Development02/25/02 15:41
RE: Redhat 7.2 - ProstgreSQL - TCP/IP problemLem02/18/02 13:54
shmmax + shared_buffersJoek Hondius02/11/02 11:02
RE: PostgreSQL on FreeBSD: before 22s, now 4sRick Morris01/28/02 22:52
RE: MySQL is lameDavid01/20/02 07:10
PostgresQL - JOINsKannan01/17/02 09:07
How to import the oracle database to Postgrese.srinivasulu01/05/02 02:50
RE: postgres gets slower HELP!Jayme Nielsen12/26/01 12:34
6.3 lakh records slows down postgresRixon Mathew12/25/01 12:07
RE: Redhat 7.2 - ProstgreSQL - TCP/IP problemTim Sutton12/15/01 07:37
Redhat 7.2 - ProstgreSQL - TCP/IP problemMehmet Ceyhan12/11/01 06:13
binarieswhat11/15/01 23:28
RE: fsync=falseDon Baccus11/14/01 21:30
RE: Table locks are EASY to avoid!Scott Marlowe10/02/01 15:56
Table locks are EASY to avoid!Jeremy Zawodny10/02/01 12:01
RE: BIGINT indexesKyle VanderBeek09/26/01 18:48
Postgresql and MySQLGeorge Box09/26/01 16:13
RE: Mysql Vs PostgresThe Gad09/19/01 12:30
PostgreSQL on FreeBSD: before 22s, now 4sMichal Pasternak09/07/01 16:22
PostgreSQL on FreeBSD: before 22s, now 4sMichal Pasternak09/07/01 15:54
RE: Other ways to optimizeChristopher Kings-Lynne09/04/01 23:39
MySQL is lameChristopher Kings-Lynne09/04/01 23:34
Commercial Support (was RE: Impressive)Tom Anderson09/04/01 07:49
RE: Persistent ConnectionsScott Marlowe09/04/01 06:58
SupportScott Marlowe09/04/01 06:53
You can check this comparsionJohn Carpenter09/04/01 06:10
RE: postgres gets slower HELP!James Hubbard09/03/01 22:25
RE: postgres gets slower HELP!Hans-Juergen Schoenig09/03/01 22:12
RE: ImpressiveJonathan09/03/01 15:25
RE: Alternative Table HandlersEricson Smith09/03/01 15:22
RE: postgres gets slower HELP!Ericson Smith09/03/01 15:19
RE: ImpressiveEricson Smith09/03/01 15:12
RE: ImpressiveAlexandre Santos09/03/01 03:20
Persistent ConnectionsBobo09/01/01 22:34
postgres gets slower HELP!sheheryar sewani08/31/01 11:21
RE: Porting MySQL database to PostgresGerzson08/31/01 09:27
Not fair to reference previous articleJoshua Ginsberg08/28/01 23:11
fsync=falseDavid08/28/01 18:27
ImpressiveBen Davis08/28/01 12:53
Mysql Vs PostgresRuss08/28/01 09:21
BIGINT indexesJason Earl08/27/01 12:40
good articleQuentin08/27/01 05:23
Int8 indexingStephan Szabo08/26/01 21:33
Thank youDigital Wokan08/26/01 00:49
SAPDBAlexandre Santos08/25/01 08:02
CorrectionAlexandre Santos08/25/01 07:53
big int indexmlw08/24/01 04:21
MySQL Berkeley_DB v PostgreSQLPeter08/23/01 16:03
Which file system?Peter08/23/01 15:42
Porting MySQL database to Postgresmorpheus()08/23/01 00:07
Postgresql Vs. MySQLRich08/22/01 15:26
Alternative Table HandlersChris Lambert08/22/01 10:04
Other ways to optimizeScott Marlowe08/22/01 08:47
persistent connectionMichael Bravo08/22/01 03:12
Schweetvincent08/22/01 03:06
Typo?Kirk Parker08/21/01 19:39
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.