jrient
V2EX  ›  问与答

Union 多表查询 和 单表多次查询 哪个对服务器的压力小?

  •  
  •   jrient · Jul 6, 2018 · 2309 views
    This topic created in 2894 days ago, the information mentioned may be changed or developed.

    最近在做数据统计脚本,统计用户等数据,数据量非常大。 100 张表 * 每表 1kw+数据。 后台执行的定时脚本,对性能没要求。

    考虑了以下几个方案

    1. union 连表查
    2. 循环多表查
    3. 循环多表查 + sleep(1)

    问问站内大佬们的看法

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3550 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 10:43 · PVG 18:43 · LAX 03:43 · JFK 06:43
    ♥ Do have faith in what you're doing.