[Corpora-List] Corpora and SQL

Lars Nygaard lars.nygaard at iln.uio.no
Tue May 22 17:08:37 UTC 2007


Lars Nygaard wrote:

> 
> This works, but slowly. It's better to use two temporary table
> 
>  drop table temp_table_a;
>  drop table temp_table_b;
> 
>  create temporary table temp_table_a (x int primary key) type=HEAP;
>  create temporary table temp_table_b (y int primary key) type=HEAP;
> 
>  insert into temp_table_a(x) select ID+3 from corpustable where word = 'a';
> 
>  insert into temp_table_b(y) select ID from corpustable where word =
> 'como';
> 
>  select temp_table_a.x from temp_table_a,temp_table_b where
> temp_table_a.x=temp_table_b.y;

Also, I guess I should mention, to get a satisfactory performance, you 
probably need to create some variants on this scheme based on the 
absolute and relative frequencies of the tokens you are searching for.

cheers,
lars nygaard



More information about the Corpora mailing list