This topic is locked

Select or Join multiple tables

11/12/2017 9:57:22 AM
PHPRunner General questions
P
Penultimatum author

Hi, I have a database that contains log data and has a table per month due to the size, and I would like to view the data either across multiple months, or select the month/table to query rather than create add a new table/view in PHPRunner each month.
ie we have the archive tables:

DATA_201709

DATA_201710

DATA_201711
I would like a single page where a user either selects the appropriate table/month they would like to search, or the they enter the start/end date and phprunner queries across multiple tables. When a new archive is created next month I would like that to automatically be available to search in the existing pages.
Any suggestions on how best to achieve this? Each table is about 60 million rows and 20G so a single table is not an option, and neither is changing how the database is fundamentally structured due to other applications.
Thanks
Jim.

romaldus 11/12/2017

Depends on what database engine you use.

Instead of create new tables manually, In Mysql for example , you can split large tables using MySql Partitioning.