-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------
On Fri, 1 Oct 1999, Rachit Siamwalla wrote:
>
>
> > > You also need to be very careful about what queries you give to mysql. It
> > > does not (at least did not) handle concurrent queries; ie. it finishes one
> > > before starting the next, so a single expensive query can kill the whole
> > > site for some time, make things backup, etc. As long as everything is an
> > > easy select that can be done via indexes, things are reasonable but it
> > > requires careful design of accesses and updates.
>
> I believe mysql is multithreaded and performs fairly well and is stable.
> I think the only problems with mysql is transactions are not supported,
> and there is no record based locking. (which may explain why the singe
> expensive query can kill the whole site). If you lock an important table
> for a long time, everything stops :).
>
> Don't quote me on this.
Well, to be a bit more precise:
It only uses table based locking and it treats updates with a higher
priority than reads. That means that if you start a read query that takes
60 seconds to execute, you can continue other reads just fine during that
period, _until_ you queue an update request on that table. Once you do
that, then nothing else (read or write) can access the table until the 60
second read finishes, then the update finishes.
So even though you are not executing any update that will lock the table
and take a long time to do the query, it can still be locked for a long
time.
It can have quite a significant impact on high traffic websites doing a
high number of normally cheap queries, since it backs up the webserver and
jserv quite horribly; you have to ensure that your code can gracefully
deal with such failures without choking everything up. Otherwise, you can
end up in errors being spit back from jserv that look something horrible.
This also presents difficulties in running a 24x7 site if you need to do
batch updates to info in the database, since you essentially have to take
the site offline to do that with mysql.
But this is getting off topic...
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]