[SQL] Regexp matching

2010-09-29 Thread Eduardas Kazakas
Hello, I have some problems using character class matching (e.g. [:alpha:]). For example I have a table: CREATE TABLE re_test (text_column character varying (50) NOT NULL); Notice, that there are some specific characters. INSERT INTO re_test VALUES ('AŠDF'); INSERT INTO re_test VALUES ('AŠDF45'

Re: [SQL] identifying duplicates in table with redundancies

2010-09-29 Thread Andreas Schmitz
On 09/28/2010 10:36 PM, Tarlika Elisabeth Schmitz wrote: On Tue, 28 Sep 2010 11:34:31 +0100 "Oliveiros d'Azevedo Cristina" wrote: - Original Message - From: "Tarlika Elisabeth Schmitz" To: Sent: Monday, September 27, 2010 5:54 PM Subject: Re: [SQL] identifying duplicates in table with

Re: [SQL] identifying duplicates in table with redundancies

2010-09-29 Thread Tarlika Elisabeth Schmitz
On Wed, 29 Sep 2010 10:40:03 +0200 Andreas Schmitz wrote: > On 09/28/2010 10:36 PM, Tarlika Elisabeth Schmitz wrote: >> On Tue, 28 Sep 2010 11:34:31 +0100 >> "Oliveiros d'Azevedo Cristina" >> wrote: >> >>> - Original Message - >>> From: "Tarlika Elisabeth Schmitz" >>> To: >>> Sent: Monda

Re: [SQL] identifying duplicates in table with redundancies

2010-09-29 Thread Oliveiros d'Azevedo Cristina
Hallo Andreas, I reduced the problem to the innermost query: 1) SELECT DISTINCT trainer_id, trainer_name FROM student This results in a sequential table scan. Execution time 7500ms. 2) I created an INDEX ON (trainer_id, trainer_name). Then I had an index scan instead, which still cost 7000ms.

Re: [SQL] Regexp matching

2010-09-29 Thread Osvaldo Kussama
2010/9/28 Eduardas Kazakas : > Hello, I have some problems using character class matching (e.g. [:alpha:]). > > For example I have a table: > > CREATE TABLE re_test (text_column character varying (50) NOT NULL); > > Notice, that there are some specific characters. > > INSERT INTO re_test VALUES ('A