Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EBC94200B5A for ; Thu, 4 Aug 2016 16:15:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EA1DB160AAB; Thu, 4 Aug 2016 14:15:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3B5B2160A6A for ; Thu, 4 Aug 2016 16:15:21 +0200 (CEST) Received: (qmail 76380 invoked by uid 500); 4 Aug 2016 14:15:20 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 76368 invoked by uid 99); 4 Aug 2016 14:15:19 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2016 14:15:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6DF90C2404 for ; Thu, 4 Aug 2016 14:15:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id wq5_fXqcWHZe for ; Thu, 4 Aug 2016 14:15:17 +0000 (UTC) Received: from mail-io0-f193.google.com (mail-io0-f193.google.com [209.85.223.193]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 5FFD06121B for ; Thu, 4 Aug 2016 14:15:17 +0000 (UTC) Received: by mail-io0-f193.google.com with SMTP id g86so22049716ioj.1 for ; Thu, 04 Aug 2016 07:15:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=HPha3DiWKcpXJsv1jXeqrfqnK1NNUcWxFr8aXRGumiI=; b=ragSWN//2ygzS3oi3IdRfyZ0YiHrfvJtbnPgutHQm0Ymr1pu0qqLWEr//smyHv3Wv0 mxQTYzBOHdxtFeVe1wjB3Vw6Ustvu/MWfV50bcGlhjrxTDC+znzbZNiybHgtsg+y2RHy Sl+yF3M454KhmTKAES8BlWRZ5JOknDUjU/rD5phsOoBOlVpbyCMLk1YJTDPyIXzdeVac qwQKj8utGsIPIxoDXBGR5xpH4UBfZ2dyeZdeDgwIUrT76e+UiIAuQ8+3lQvred9cs5S3 ZdS40jNNfxKryFr7ypPifyI7RSiVxhZfRASI4yxjWFEi7Y9CpwnLH212fiGREV91dtRG O71Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=HPha3DiWKcpXJsv1jXeqrfqnK1NNUcWxFr8aXRGumiI=; b=fCRHXdRB7qhO+mcIQ5lINebwIVjjlC/H+ytPTO74hAxbadWt6n9kZkbwar34E5SOiC VthIa6qA1FEzjVLUQn7LM+bG/Ob2IBiSDD8vwKkCLOSFJiMSjQsLsaX6rH6mWdKjObq2 JeaMBHZlvJZjLFaL+QGFGHgo+RjO5dGlb3yT5RfMMRrG3rSkT84Yzo3cHoCVspaKYv4l ILLsp5CjoCTSzd/U4H6+Y82gBNyy4wz9Fakz1Gqem7Kb+IMRyAqqSwZ45Dwqpo4gzr0y ntr6arCr5wR4NSzUO+aGyd/g4szlaJOChgEjx5mMhR9GlwSlRBoI7npJweCz9lA20RZi ENmQ== X-Gm-Message-State: AEkoout9YzgUDqvAuToxY1VTA+NWmRwJxiXP6G22rZB17IJo8cCdrREbDGCyoIfx+PyMd3fJub+9sWxCNqZHwg== X-Received: by 10.107.62.135 with SMTP id l129mr72663071ioa.185.1470320116581; Thu, 04 Aug 2016 07:15:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.191.69 with HTTP; Thu, 4 Aug 2016 07:14:56 -0700 (PDT) From: Igor Kuzmenko Date: Thu, 4 Aug 2016 17:14:56 +0300 Message-ID: Subject: Hive LIKE predicate. '_' wildcard decrease perfomance To: user@hive.apache.org Content-Type: multipart/alternative; boundary=94eb2c061464415f1205393f94d8 archived-at: Thu, 04 Aug 2016 14:15:22 -0000 --94eb2c061464415f1205393f94d8 Content-Type: text/plain; charset=UTF-8 I've got Hive Transactional table 'data_http' in ORC format, containing around 100.000.000 rows. When I execute query: select * from data_http where res_url like '%mts.ru%' it completes in 10 seconds. But executing query select * from data_http where res_url like '%mts_ru%' takes more than 30 minutes. Why '_' wildcard decrease perfomance? --94eb2c061464415f1205393f94d8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I've got Hive Transactional table 'data_http'= =C2=A0in ORC format, containing around 100.000.000 rows.

When I execute query:=C2=A0
select * from data_http
<= div>
where res_url like '%mts.ru%'= ;

it completes in 10 seconds.
But executing query=C2=A0

select * fr= om data_http
where res_url like '%mts_ru%'

takes more than 30 minutes.=C2=A0
<= br>
Why '_' wildcard decrease perfomance?
--94eb2c061464415f1205393f94d8--