|
Posted by Jerry Stuckle on 07/11/07 22:11
lawpoop@gmail.com wrote:
> On Jul 11, 1:40 pm, lawp...@gmail.com wrote:
>
>> I tested Apache serving a static HTML webpage, and that got served up
>> in a timely manner during parsing.
>>
>> I understand Postgres getting bogged down with selects and inserts,
>> but there's only one instance of the PHP parser than can parse web
>> pages? That if one PHP script is bogging down on the server, all PHP
>> scripts will be bogged down?
>
> Actually, I did some more testing, and it looks like postgres is the
> culprit.
>
> I can serve static HTML pages while parsing, I can spit out data from
> infinte loops in php while parsing, but I can't seem to get data from
> other queries when doing a bunch of inserts.
>
>
>
>
Each new connection to the server starts a new process or thread
(depending on your OS and Apache version) to handle the request. So you
have multiple PHP parsers running.
What you're probably running into is locking in PostGres. When you're
inserting or updating rows, PostGres can lock rows or tables so that
queries don't get partially updated data or data which hasn't been
committed.
The result is SELECT statements will wait until you COMMIT or ROLLBACK
the INSERT or UPDATE transaction (or close the connection).
This is standard for virtually all databases.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|