On July 5, 2002 07:54 pm, Pete James wrote:
> "Ilia A." wrote:
> >  The biggest annoyance I've come across is
> > the fact that while using PostgreSQL with PHP is that when you fetch a
> > row you must specify the number of the result, while in MySQL, that is
> > handled internally by PHP for you. This means that your PHP scripts must
> > track the row numbers themselves.
> This is not so... see pg_fetch_array.  Since PHP 4.1.0, you no longer
> need the row number.

It may work without, but according to the manual on php.net

REQUIRE a row number. If that is no longer the case as you claim, perphaps 
someone needs to inform the developers and have them update the 

> > Now we come to the actual database speed itself. In this regard in most
> > applications MySQL is MUCH faster probably because it has to do allot
> > less work then PostgreSQL does. For example, lets analyze the most common
> > action performed in a database system, a SELECT. When you do a select in
> > MySQL, MySQL internally locks the table for the duration of the select.
> > PostgreSQL on the other hand does a row level lock, internally, for every
> > row you select.
> Is this really what you want?  Doesn't this mean that PostgreSQL would
> be more efficient for larger user volumes?  Locking an entire table
> isn't usually a good thing.

Not necessarily, locking entire table has its pluses and minuses. The BIG 
minues is that while the entire table is locked you cannot do anything until 
the lock is released. On the other hand, it is MUCH faster to lock the entire 
table then the inidividual rows. PostgreSQL would be more effecient on a 
system that does lots of locking, but on a system without or few locks MySQL 
will beat it hands down.

FUDforum Core Developer

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to