Re: Survey: MySQL vs PostgreSQL for PHP
| From: | Pete James | Date: | Fri, 05 Jul 2002 23:54:25 +0000 |
| Subject: | Re: Survey: MySQL vs PostgreSQL for PHP | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105756@lists.php.net to get a copy of this message | ||
"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.
> 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.
Pete.