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 · 93 天前 · 271 次点击
    这是一个创建于 93 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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