Daniel Kirk writes:
 > Hi there,
 > 
 > I am considering porting a MS-SQLServer database to MySQL.  After reading
 > some of the documentation, I am concerned about inserts.
 > 
 > I run a sports prediction website, where players submit their predictions
 > for a competition.  When a player submits their predictions, this is
 > generally 10 inserts into each of 3 different tables.
 > 
 > It is not feasible to store these inserts in a pool and execute them later -
 > they must be done so that the player receives confirmation that their
 > predictions were submitted straight away - their predictions must also be
 > submitted by a certain time so the time they submitted them must be
 > accurate.
 > 
 > The website generally gets busy on a friday afternoon as that is when most
 > people want to submit their predictions.  Hence I need the database to be
 > able to inserts thousands of records per second - how much would MySQL be
 > able to handle?
 > 
 > Another problem I foresee is that this table is also used for people to view
 > the predictions of other users.  So a common query is something like "SELECT
 > tip FROM UserTippingInfo WHERE userid = x AND matchnumber = y".  Would I be
 > best to keep the in the one table or should I create a View on the table or
 > a copy of the table to query?
 > 
 > thx for your help
 > 
 > Dan


Hi!

If you would use multi-row INSERT's, you would be surprised of the
speed that MySQL is capable of.

Regarding SELECT's, you just have to normalize your schema and put
indices to the right place, which in the above situation would be on
userid and matchnumber, without unnecessary duplicating tables. Also
try not to DELETE rows, but to mark them so that INSERT's and SELECT's
could work in parallel (if on UNIX).


Regards,

Sinisa

      ____  __     _____   _____  ___     ==  MySQL AB
     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic
    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus
  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____
  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
             /*/             \*\                Developers Team

---------------------------------------------------------------------
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