Philippe,

did you try to do the insert and select on the same database page?

In BDB there is page level locking used, and the behavior you
describe sounds like that the select has placed a page level lock
on the page where you try to insert. Then it is correct behavior
of the database that your insert has to wait until the commit which
releases the locks placed by the select.

A possible solution would be to use 'dirty read', i.e., non-locking
read in select, but I do not know if BDB provides such.

My own Innobase table handler allows you to read and insert data
concurrently with no interference from locks, because Innobase
does in a select a consistent non-locking read, in the style of Oracle.

But MySQL/Innobase is not available yet. I have virtually completed
the interfacing work to MySQL, and Monty just said that Innobase should
come out in version 3.23 of MySQL next weekend.

Regards,

Heikki

--------------- Original message -----------------------------------
Hi 

I post once more this message, because I didn't receive any answer.

----- Message d'origine ----- 
De : Philippe MORIN 
À : [EMAIL PROTECTED] 
Envoyé : vendredi 9 février 2001 09:49
Objet : Concurrent insert/select with BDB


Hi

I'm using MySQL 3.23.32 on Linux.
I try to run concurrent insert/select requests on BDB tables, but it doesn't
work.

I started mysqld with --bdb-shared-data option.

I run mysql on 2 clients (on the same computer). The first one runs a select
request 
and the second one runs an insert request.
If I use autocommit, the insert waits for the end of the select.
If I don't use autocommit, the insert waits for the commit of my first client.

Did someone ever use concurrent insert/select with BDB databases ?
Are there some special parameters to initialize, to allow insert and select
at the 
same time (it doens't matter for me if my first client reads duplicated
records).

Thanks a lot !
                                      

Philippe Morin - Prologue Software (France)
Software Engineer
Email: [EMAIL PROTECTED]
Internet : http://www.prologue-software.com
                                   




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to