Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: OT: MySQL - rows or tables

by dws (Chancellor)
on May 29, 2005 at 05:50 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found