Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 42532311511 for ; Wed, 14 Dec 2011 12:05:46 -0400 (AST) Received: from mail-iy0-f174.google.com ([209.85.210.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RarKz-0004tL-Rf for pgsql-performance@postgresql.org; Wed, 14 Dec 2011 16:05:46 +0000 Received: by iaeh11 with SMTP id h11so1409802iae.19 for ; Wed, 14 Dec 2011 08:05:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=IiQC0DpamZclSE4C9W23R/W3DkWR+atmdFVu2f2RivA=; b=DuLCKB6XsbZ7VVk3PNmwCz7h5LdmF/yX3DzT8KO464cS15jM2TrpFo5mQI7SX4dYzd rgiH1RvUvOKzuCFiTd2sCWpPRs6M2ZIxCv9MrtcZ0c5Va/bGW6d+Gbe7eXklte+kInA5 9QtcSsci0XlYT63XzHI7PelIP9ufUPHMqMPnc= Received: by 10.50.45.225 with SMTP id q1mr24670262igm.89.1323878733271; Wed, 14 Dec 2011 08:05:33 -0800 (PST) Received: from [192.168.11.4] ([114.95.167.241]) by mx.google.com with ESMTPS id py9sm5170308igc.2.2011.12.14.08.05.30 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Dec 2011 08:05:32 -0800 (PST) Message-ID: <4EE8C94B.5000607@gmail.com> Date: Thu, 15 Dec 2011 00:05:31 +0800 From: Rural Hunter User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Is it possible to use index on column for regexp match operator '~'? Content-Type: text/plain; charset=GB18030; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201112/117 X-Sequence-Number: 45916 for example, the where condition is: where 'aaaa' ~ col1. I created a normal index on col1 but seems it is not used.