Jump to content

When to create new tables?


Kane250

Recommended Posts

Hi,

 

I don't use MySQL all that much and this is probably a dumb question, but I could definitely use some advice.

 

I have a web app that is taking paragraphs, splitting them up into sentences, and inserting each sentence separately into a table with a unique ID so I can sort which ones came from where.

 

ex:  table: para1  entry: I am a sentence  id: 1234

      table: para2  entry: I am a sentence  id: 1234     

      table: para1  entry: I am a sentence  id: 0999

      table: para2  entry: I am a sentence  id: 0999

 

These tables will have pretty heavy amounts of text flowing into them over time, and I'm wondering when a table is too large and another should be created.  I would think that if I only used the one table forever, performance would get very slow when calling back all those entries.  I also thought I might just create a new table for each paragraph and it's unique ID...like this:

 

table: 1234para1  entry: I am a sentence

table: 1234para2  entry: I am a sentence

table: 0999para1  entry: I am a sentence

table: 0999para2  entry: I am a sentence

 

I really don't know which is going to be better for performance.  I was told that creating a ton of tables is bad, but I feel like filling up 1 table with possibly thousands of entries could be equally as bad?

 

Any ideas?  Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/151839-when-to-create-new-tables/
Share on other sites

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.