V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
? MySQL 5.5 Community Server
? MySQL 5.6 Community Server
? Percona Configuration Wizard
? XtraBackup 搭建主从复制
Great Sites on MySQL
? Percona
? MySQL Performance Blog
? Severalnines
推荐管理工具
? Sequel Pro
? phpMyAdmin
推荐书目
? MySQL Cookbook
MySQL 相关项目
? MariaDB
? Drizzle
参考文档
? http://mysql-python.sourceforge.net/MySQLdb.html
insert000
V2EX  ?  MySQL

Navicat 支持用正则表达式搜索表名嘛?

  •  
  •   insert000 · 101 天前 · 296 次点击
    这是一个创建于 101 天前的主题,其中的信息可能已经有所发展或是发生改变。

    腾讯云最新优惠活动来了:云产品限时1折,云服务器低至88元/年 ,点击这里立即抢购:9i0i.cn/qcloud,更有2860元代金券免费领取,付款直接抵现金用,点击这里立即领取:9i0i.cn/qcloudquan

    (福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun

    我想按表前缀 + 租户后缀匹配业务表 ,现在使用得 heidiSQL 工具 是支持这种检索,^component_.*_10000$。 不知道 Navicat 是否能实现这样得搜索,在哪操作

    5200
        1
    5200  
       101 天前
    可以的,
    ![1e2b92b2086d4093312c76f667a32daa.png]( https://i.miji.bid/2024/01/25/1e2b92b2086d4093312c76f667a32daa.png)![5ae2e3049a0cdc644fde9d333c31f054.png]( https://i.miji.bid/2024/01/25/5ae2e3049a0cdc644fde9d333c31f054.png)
    insert000
        2
    insert000  
    OP
       101 天前
    @5200 搜索不动,一检索就卡死了 。表名检索应该不至于吧。。。
    5200
        3
    5200  
       101 天前
    @insert000 #2 查询范围之类的记得看看,默认是查询全部数据了
    SilenceLL
        4
    SilenceLL  
       101 天前
    SELECT * FROM information_schema.STATISTICS WHERE table_schema= DATABASE() AND TABLE_NAME LIKE 'component_%_10000';
    这样子满足吗
    insert000
        5
    insert000  
    OP
       100 天前
    @SilenceLL 这样是可以查看,我平时使用场景 需要频繁切换不同租户和业务 ,写 SQL 来找表 然后看数据 ,这样交互操作太耗时
    SilenceLL
        6
    SilenceLL  
       100 天前
    @insert000 #5 可以考虑建路由表,租户 id 和业务表的路由关系
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2610 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 09:09 · PVG 17:09 · LAX 02:09 · JFK 05:09
    Developed with CodeLauncher
    ? Do have faith in what you're doing.


    http://www.vxiaotou.com