Re: Sharing a DBI::Mysql database connection with your children



xhoster@xxxxxxxxx wrote:
Andrew DeFaria <Andrew@xxxxxxxxxxx> wrote:

I have a process I was thinking of making into a multithreaded daemon
that deals with a MySQL database. The thought is that the daemon
would open the database once, then listen for clients. As clients
connected the daemon would fork off a copy of itself and handle the
requests. This would make the process faster because I wouldn't need
to open the database every time a new client wanted service.

On my system it takes less than one millisecond to open a connection
to a MySQL server (located on a different system.) Do you find that
connection time problematic? This is about the same amount of time
it takes to fork in the first place.

Normally this would be true, if the MySQL server is on the same network,
but if it's not, connection time depends entirely on the latency between
the OP's running system and the MySQL server, such is the case if it is
across the internet; it will surely take longer than a millisecond. But
then again, that would hardly be an ideal setup, but it's not unheard
of.

--
szr


.



Relevant Pages

  • Re: [kde] Has the KDE Social/Semantic Desktop been worth the hassle to anyone?
    ... commercial stuff couldn't do without databases, but just to take mysql ... as an example since that was the first and probably most common akonadi ... backend, it's known for database version upgrades that need extra steps ...
    (KDE)
  • Re: MySQL Database problem (probably already solved in a message, but this is somewhat urgent)
    ... MySQL server has a database with a table, ... columns, an FSR column, and a password column. ... checked if the supposed arrays that were returned were actually arrays ...
    (comp.lang.php)
  • RE: FreeBSD 5.3 MySQL Performance
    ... versions of Linux and FreeBSD for most tests. ... > popular with the ATA disk drive manufacturers. ... > Many companies have used FreeBSD and MySQL for years and years. ... it is not often that you have such a small database and such a large ...
    (freebsd-questions)
  • ANN: Database Designer for MySQL version 1.6 is released
    ... The new version 1.6 of MicroOLAP Database Designer for MySQL has been ... The secure shell (SSH) tunneling is now implemented in Database ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: toolkits or APIs to create a web interface as a frontend to mysql
    ... I am also *not* looking for a web based full fledged mysql client. ... For simple display of tabulated data the most useful thing is a displaywhich uses 's with absolute coordinates to position text in a box of defined width, formatted to be left, right or center justified, an using a preselected style from a a style sheet. ... As far as the actual database calls go, those are specific to each form, and apart from a little coding so that 'database_open, database_close' exist in the library, taking such things as the database name, user name and password from an included file I find it easiest to simply do the query and iterate through it to display the data requested. ...
    (comp.os.linux.misc)