0

whenever we are firing a insert query, for that point of instant that particular table is locked for a span of time. That time can be some micro seconds or some seconds depending upon the row need to be inserted in database.

I am developing an application for a university which have more than a lac of users.

I am taking care of it because last some days i am googleing it and i got the staticstics as follow

10 simple read query = 1 simple write query

The main problem is notification, whenever a teacher put some updates, i am notifying the student and only those student will get notification who are interested. So it may happen that one update may have 10000+ notification and this will definitely take 3-5 seconds (waiting time). So all reads will be in the queue.

So is there any way to get down the waiting time?

KuKu
  • 646
  • 2
  • 15
  • 38

1 Answers1

1

Maybe you could use InnoDB instead of MyISAM, as the former has a row-level-locking, whereas the latter has table-level-locking when writing. If you use InnoDB as table engine, only one row is locked, but any other contents may still get viewed.

feeela
  • 29,399
  • 7
  • 59
  • 71
  • so it means that if i am inserting 10000+ row and in between the read request come, read request will execute and insertion will going on..? – KuKu Jul 04 '12 at 10:46
  • 1
    Sure, why not? If it where different, huge site couldn't allow saving to their users, because no other user could visit the site during one persons save. – feeela Jul 04 '12 at 12:01