zoukankan      html  css  js  c++  java
  • clickhouse 中select in操作

    https://clickhouse.yandex/docs/en/operations/settings/settings/

    distributed_product_mode

    Changes the behavior of distributed subqueries.

    ClickHouse applies this setting when the query contains the product of distributed tables, i.e. when the query for a distributed table contains a non-GLOBAL subquery for the distributed table.

    Restrictions:

    • Only applied for IN and JOIN subqueries.
    • Only if the FROM section uses a distributed table containing more than one shard.
    • If the subquery concerns a distributed table containing more than one shard,
    • Not used for a table-valued remote function.

    The possible values are:

    • deny — Default value. Prohibits using these types of subqueries (returns the "Double-distributed in/JOIN subqueries is denied" exception).
    • local — Replaces the database and table in the subquery with local ones for the destination server (shard), leaving the normal IN / JOIN.
    • global — Replaces the IN / JOIN query with GLOBAL IN / GLOBAL JOIN.
    • allow — Allows the use of these types of subqueries.
    • https://blog.csdn.net/ma15732625261/article/details/86607199
    • 分布式子查询

      带有子查询的in

      1、普通in,查询发送到远程服务器,且每个服务器中运行in或join子句的子查询

      2、global in、global join时,先为global in、global join运行所有子查询,将结果收到临时表且将表发给每个服务器,使用临时表运行查询

      非分布式查询,使用普通的in、join

      假设集群中每个服务器都存在一个正常表local_table,与分布式表distributed_table

         对distributed_table查询,查询被送到服务器且使用local_table运行查询

  • 相关阅读:
    Android ConstraintLayout详解
    Android开发屏幕适配解决方
    高并发场景下的一种JVM GC优化配置【CMS】
    Runnable 和 Callable的区别
    理解对象实例化顺序
    mysql 优化原理【转】
    使用@Scheduled注解编写spring定时任务
    Spring加载resource时classpath*:与classpath:的区别
    Java 8 中的 Streams API 详解
    java 8 函数式接口
  • 原文地址:https://www.cnblogs.com/miaoer/p/10592841.html
Copyright © 2011-2022 走看看