Mysql为同一架构类型的多个表创建一个单独的表名 [英] Mysql create a single table name for the same schema type multiple tables

查看:143
本文介绍了Mysql为同一架构类型的多个表创建一个单独的表名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建10个具有相同模式的表,用于加载应用程序LOG。



我正在创建10个具有相同模式的表,最后创建一个别名将代表所有这10个表。



所以它关心当前的活动表选择来插入记录,所以一旦table1被填充更多的记录,它将选择table2和next table3 ....



所以在选择一个记录的时候,它将检查所有10个表格中所请求的记录.....



现在我的问题是,我忘了我是如何创建的,以及我使用了哪个陈述。



如果有人知道,请让我知道这个

解决方案

您正在重新发明分区,请使用MySQL提供的工具,它将为您节省大量时间和精力。头痛。


I was creating 10 tables with same schema for loading application LOG.

I was creating 10 tables with same schema and at the end I do create a alias name which will represent all those 10 tables.

So it take care about current active table selection to insert the records, so once table1 gets filled more records it will choose table2 and next table3....

So while selecting a record, it will check all the 10 tables for the requested record.....

Now my question is, I forgot about how did I created and which statement I have used.

If anyone knows then please let me know about this.

解决方案

You are reinventing partitioning, please use the tools MySQL provides for this, it will save you a lot of time & headaches.

这篇关于Mysql为同一架构类型的多个表创建一个单独的表名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆