SQL table tuning tip

Basically I have an XML file from an external server.

Xml correlation has one parameter value = n value now N can only be between 1 and 30

Whatever I choose, there will always be 4000 lines returned from the XML file. My script will call this xml file 30 times for each value once a day. So there are 120,000 lines. I will make fairly complex queries on these lines. But the main thing is that I will always first filter by value, therefore SELECT * WHERE value = 'N', etc. It will ALWAYS be used.

Now is it better to have one table where all 120k rows are stored? or 30 tables were saved 4k rows?

EDIT: The SQL database in question will be MySQL

EDIT: just to make it clearer, the data will be UPDATED every day, so the old tables will be overwritten, I don't want any archive solutions, just the best way to save the data so that there are as few performance bottlenecks as possible, the database results post-output data will be cached and also updated daily.

EDIT: I guess I'm too vague for my own good :( Basically, channels are leaderboards, each value is a different place in the leaderboard.

The values ​​will be updated only if the position in the leaderboard changes, and there will always be only 120 thousand lines. no more, no less.

Let's say:

  • blue
  • Green
  • Red

This is the current leaderboard and the next update that the feed returns:

  • blue
  • Red
  • Green

2 3 . , :)

> . <: 12 1 . , , , , 80 , .

+5
6

120 . 30 4 . .

, . SQL, WHERE, .

+3

, . ( - , "" sql).

, , . , .

0

- .

, , , WHERE.

, , .

, , - 45 90 5 (12 * 24 = 288 ). 288 , , .

0

. 30 (yuck).

? , 8k SQL? ( - .) , ? , ? , ?

, "n" , ( "n" WHERE). , "n" 1 30, SQL 2005 , , , , , .

0

, . - - , , , . , ( , , ), , - , , , .

0

Oded, 120K /, ( ).

, , SQL ". , , " "(" ") SQL:

. , A-M N-Z . .

, . : big .

, - , № 2: .

SQL , . , youre ; . Sharding .

Even if it was originally associated with the separation between other databases, the same concept may apply to your case in which you are trying to achieve a kind of “internal” separation.

Conclusion, the answer for real NoSQL scaling . Again, not with 120K lines :)

0
source

All Articles