How can one optimize the database structure that currently has two tables "tbl_incoming" and "tbl_outgoing" .The data the tables are going to hold is pretty much obvious .tbl_incoming is saving all the incoming messages to a server while the server's replies 开发者_如何学Pythonare stored in the tbl_outgoing for a particular incoming message . Lets say that I found myself handling a large amount of data for both tables. A 1 to many relationship from tbl_incoming to tbl_outgoing . What is the best way to do the optimization if i have a million+ incoming messages and for each message tons of outgoing message and i want to retrieve them all .

Converting comment to answer -
Try it with an index, if it perform badly then you should look for solution. Until you've tried with real-world data you won't know
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论