448191 Posted June 2, 2008 Share Posted June 2, 2008 I need to log every single vote, but there are about 30 to 100k of them a day. The client wants to keep the votes for 4 days. So that could mean up to 400k rows. Not a big issue, but I also have to do some selects on the table to count the number of times a specific IP voted within a timeframe. On top of that, it's a weak server. I'm tempted to make a buffer table for the selects and use INSERT .. SELECT into the main table. It's a MySQL server, don't know which version. What do you think? Quote Link to comment https://forums.phpfreaks.com/topic/108395-solved-massive-poll-votes-table-performance/ Share on other sites More sharing options...
paulman888888 Posted June 2, 2008 Share Posted June 2, 2008 no no no no no. For each answer is a row. Instead of seeing who click what. Try this. if i clicked on option 2 you should get it to do the following option2 = add 1 to the current value (you should now how to get the current value) dont do person 1 = option1 person 2 = option3 because it takes loads of time. Quote Link to comment https://forums.phpfreaks.com/topic/108395-solved-massive-poll-votes-table-performance/#findComment-555719 Share on other sites More sharing options...
448191 Posted June 2, 2008 Author Share Posted June 2, 2008 no no no no no. For each answer is a row. Instead of seeing who click what. Try this. if i clicked on option 2 you should get it to do the following option2 = add 1 to the current value (you should now how to get the current value) dont do person 1 = option1 person 2 = option3 because it takes loads of time. That's what the client wants. The increment thing is already in place. Quote Link to comment https://forums.phpfreaks.com/topic/108395-solved-massive-poll-votes-table-performance/#findComment-555727 Share on other sites More sharing options...
448191 Posted June 2, 2008 Author Share Posted June 2, 2008 Oh, and "yes yes yes yes yes". Quote Link to comment https://forums.phpfreaks.com/topic/108395-solved-massive-poll-votes-table-performance/#findComment-555734 Share on other sites More sharing options...
448191 Posted June 2, 2008 Author Share Posted June 2, 2008 Never mind, it's a done deal already (sent my response to the requirements). Thanks anyway. Quote Link to comment https://forums.phpfreaks.com/topic/108395-solved-massive-poll-votes-table-performance/#findComment-555788 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.