Skip site navigation (1) Skip section navigation (2)

store A LOT of 3-tuples for comparisons

From: Moritz Onken <onken(at)houseofdesign(dot)de>
To: pgsql-performance(at)postgresql(dot)org
Subject: store A LOT of 3-tuples for comparisons
Date: 2008-02-22 15:42:29
Message-ID: (view raw or whole thread)
Lists: pgsql-performance

I need to store a lot of 3-tuples of words (e.g. "he", "can",  
"drink"), order matters!
The source is about 4 GB of these 3-tuples.
I need to store them in a table and check whether one of them is  
already stored, and if that's the case to increment a column named  
"count" (or something).

I thought of doing all the inserts without having an index and without  
doing the check whether the row is already there. After that I'd do a  
"group by" and count(*) on that table. Is this a good idea?

I don't know much about Pgs data types. I'd try to use the varchar  
type. But maybe there is a better data type?
What kind of index should I use?

This is for a scientific research.

Thanks in advance



pgsql-performance by date

Next:From: MatthewDate: 2008-02-22 15:49:34
Subject: Re: store A LOT of 3-tuples for comparisons
Previous:From: Guillaume CottenceauDate: 2008-02-22 10:40:42
Subject: Re: 7 hrs for a pg_restore?

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group