Hi, developers. Iβm learning how to quickly select rows from many tables with the same structure. The tables have too much data for 1 table. Thus, each table contains data for 1 month. For example, log_2011_01, log_2011_02, etc. The tables have a datetime created_at column.
I need to create a stored procedure, it must contain 2 datetime parameters to search between these dates and several others.
Now I see the following implementation: the stored procedure should calculate the collection of tables between 2 dates and generate sql to select data with union_all. I think Iβll be hard and not ready for a big load, right? Are there any other options for this? Thanks
source share