Deekshith's avatar

Performance improvement in laravel online MCQ test application

Hello,

I have an online exam application (MCQ type questions) i have questions table and user_answers table and every test will have 100 questions right now i am using this approach,

at first i have created user_answers table and when user click on question options as answer i am storing question_id, user_answer and time taken in table and if user changes the option i am using update query to update the answer so i am doing like this for all 100 questions so when user clicks end exam i am just changing the user_test column status as complete. this is working fine for below 500 users at a time. but when it reaches more than 1000 users at a time then it is giving I/0 problem. is this correct way or any performance tweaks that can be done?

Please help me with this.

0 likes
3 replies
m7vm7v's avatar

You could handle all the logic in the front end. Get all the questions on a single request then collect the user's answers in the browser cache and then submit them at the end in one go.

Deekshith's avatar

@m7vm7v browser cache means local storage? i should store question_id with answer for all 100 questions

Snapey's avatar

You should not have these limitations unless you have not examined your database queries and applied the correct indexes.

Please or to participate in this conversation.