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?

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.

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.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.