Showing entries 521 to 525
« 10 Newer Entries
Displaying posts with tag: postgresql (reset)
Performance tuning DRBD setups


These days, we seem to be getting a lot of inquiries from new or would-be DRBD adopters, especially MySQL and PostgreSQL DBAs wanting to add high availability to their master database servers. And these, unsurprisingly, turn out to be two of their most popular questions:

How will using DRBD affect my write performance?

… and …

What are DRBD’s most important tunables with regard to write performance?

Let’s take a look at both of these issues. Ready? Let’s go.

Basically, there’s usually one important potential bottleneck in any DRBD “Protocol C” (synchronous replication) setup, and it’s not the network connection. With ubiquitous Gigabit Ethernet links available to be dedicated for DRBD replication, network latency and throughput become negligable variables. The …

[Read more]
Defining Commodity Features of Open Source Software

Open Source software is often being referred to as commodity products. This is particularly true for OSS databases like MySQL or PostgreSQL. Developers of such systems can heavily make use of defined standards. In this case, it’s the various SQL standards. These standards define the general functionality set your product should have. They help you define the commodity features of your software.

The question is: where do you get your software requirements from if the OSS product you are developing cannot rely on any or only a few standards?

Let’s take a look at two other types of OSS products: Enterprise Content Management (ECM) and collaborative software. I used to work for an Open Source ECM vendor until recently and just …

[Read more]
EnterpriseDB - PostgreSQL with Oracle Compatibility

I have been hearing a bit of buzz about EnterpriseDB latley. I think the main reason is that they just secured $7 million in venture capital funding.

What is EnterpriseDB?

EnterpriseDB is based on the source code for the open source PostgreSQL database server. PostgreSQL is the most fully featured open source database out there, they already support pretty much everything on the MySQL 5 feature list.

What the EnterpriseDB people have done is taken the PostgreSQL source code and added features to make it more compatable with Oracle.

EnterpriseDB 2005?s built-in compatibility features allow most existing Oracle-based applications to run unchanged. If you are building new applications, there is no need to learn new versions of SQL syntax, …

[Read more]
SQL to Select a random row from a database table

There are lots of ways to select a random record or row from a database table. Here are some example SQL statements that don't require additional application logic, but each database server requires different SQL syntax.

Select a random row with MySQL:

SELECT column FROM table
ORDER BY RAND()
LIMIT 1

Select a random row with PostgreSQL:

SELECT column FROM table
ORDER BY RANDOM()
LIMIT 1

Select a random row with Microsoft SQL Server:

SELECT TOP 1 column FROM table
ORDER BY NEWID()

Select a random row with IBM DB2

SELECT column FROM table
ORDER BY RAND() 
FETCH FIRST 1 ROWS ONLY

Thanks Tim

Select a random record with Oracle:

SELECT column FROM 
( SELECT column FROM table
  ORDER BY …
[Read more]
Some docs about postgres

I had to do a bit of research into postgres a while ago to help a customer migrate from postgres to MaxDB. I must admit that postgres is developing well. It is an entirely different beast than MySQL, and compliments it well.

I think that the MySQL and pg developers would do well to make amends and share some of their war stories. I think people involved in both projects have much to learn from one another.

I learned while on the #postgres channel on the Freenode irc network about a few good tools that come with the Debian packages of postgres.

Debian package names:
postgresql - object-relational SQL database management system (transitional)
postgresql-client - front-end programs for PostgreSQL (transitional package)
postgresql-common - manager for PostgreSQL database clusters
postgresql-contrib - additional facilities …

[Read more]
Showing entries 521 to 525
« 10 Newer Entries