DBeaver - Clickhouse - SQL 错误 [159] .. 读取超时

que*_*ark 9 dbeaver clickhouse

在 1,3b 行数据库上运行查询时,我收到“读取超时”消息。

这不是将推文中的主题标签分组在一起的特定高级查询:

SELECT case when match(hashtag, 
            '[Cc]orona.*|COVID.*|[Cc]ovid.*|[Cc]oVID_19.*|[Cc]orvid19.*|COVD19.*|CORONA.*|KILLTHEVI.*|SARSCoV.*|ChineseVi.*|WuhanVir.*|ChinaVir.*|[Vv]irus.*|
            [Qq]uarantine|[Pp]andemic.*|[Cc]linical[Tt]rial.*|FlattenTheCurve.*|SocialDistancing.*|StayHome.*|StayTheFHome.*|StayAtHome.*|stopthespread.*|
            SafeHands.*|WashYourHands.*|SelfIsolation.*')                           then 'COVID19' 
            when match(hashtag, '[Jj]anta[Cc]urfew.*|[Jj]anata[Cc]urfew.*')         then 'JantaCurfew'
            when match(hashtag, 'Bhula.*')                                          then 'Bhula'
            when match(hashtag, '[Ss]t[Pp]atrick.*|HappyStPatrick')                 then 'StPatricks day'
            when match(hashtag, '[Cc]hina.*')                                       then 'China'
            when match(hashtag, '[Ii]taly.*')                                       then 'Italy'
            when match(hashtag, '[Ii]ran.*')                                        then 'Iran'
            when match(hashtag, '[Ii]ndia.*')                                       then 'India'
            when match(hashtag, '[Hh]appy[Mm]others[Dd]ay.*|[Mm]others[Dd]ay.*')    then 'MothersDay'
            else hashtag END
            as Hashtag,
  SUM(CASE WHEN created >= '2020-05-14 00:00:00' AND created <= '2020-03-14 23:59:59' THEN 1 END) "May 14th'20",
  SUM(CASE WHEN created >= '2020-05-13 00:00:00' AND created <= '2020-03-13 23:59:59' THEN 1 END) "May 13th'20",
  SUM(CASE WHEN created >= '2020-05-12 00:00:00' AND created <= '2020-03-12 23:59:59' THEN 1 END) "May 12th'20"
FROM twitterDBhashtags
group by Hashtag 
order by "May 12th'20" DESC limit 20;
Run Code Online (Sandbox Code Playgroud)

Clickhouse 运行在条带硬盘上并通过 GB 网络访问。

如果这是挑战,如何更改超时以留出更多时间?

如果可能的话,我非常希望能够运行多分钟的查询而不会收到“读取超时”消息。

Den*_*ane 32

CH jdbc驱动程序默认socket_timeout = 30000(30秒)

在“高级”选项卡下,您可以配置高级连接设置,> 例如,字符编码。

连接/高级属性/新属性->socket_timeout = 300000

  • 完美的。我知道我错过了一些东西。树木和森林..“编辑连接”-&gt;“驱动程序属性”-&gt;向下滚动列表到“socket_timeout”:-)。现在它愉快地运行了 (5认同)
  • 在社区版版本22.2.4.202211061524中右键单击连接-&gt;编辑(F4)-&gt;驱动程序属性选项卡-&gt;socket_timeout (2认同)