Jump to content

[SOLVED] Massive poll votes table: performance


448191

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.