Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: OT: MySQL - rows or tables

by dws (Chancellor)
on May 29, 2005 at 05:50 UTC ( #461458=note: print w/replies, xml ) Need Help??

in reply to OT: MySQL - rows or tables

So my question is, should I make individual tables for each member to keep track of their a poll (many tables since many members) or have the poll data inside a single table--therefore many polls would be many rows.

I'd use a single table, and would add a secondary, non-unique index on member id. (Without the secondary index, any search that included the member id would be linear through the entire table. With the index, you're searching a much smaller subset of the table.) Using one table gives you the benefit of (probably) keeping much of the index in the operating system's disk cache. That'd be a bit harder with lots of small tables.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://461458]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2020-10-25 16:59 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (249 votes). Check out past polls.