Re: Working with huge amount of data.
От | Jonathan Ballet |
---|---|
Тема | Re: Working with huge amount of data. |
Дата | |
Msg-id | 47B07B3F.9030204@multani.info обсуждение исходный текст |
Ответ на | Working with huge amount of data. (Mario Lopez <mario@lar3d.com>) |
Список | pgsql-general |
Mario Lopez wrote: > Hi guys :-), I am working on a personal project in which I am trying to > make sense on a huge (at least for me) amount of data. I have > approximately 150 million rows of unique words (they are not exactly > words it is just for explaining the situation). > > The table I am inserting this is a quite simple table, something like this: > > CREATE TABLE "public"."names" ( > "id" SERIAL, > "name" VARCHAR(255) > ) WITHOUT OIDS; > > It is a requirement that I can make searches on the varchar with queries > that look the following way: > > SELECT * FROM names WHERE name LIKE ‘keyword%’ > Or > SELECT * FROM names WHERE name LIKE ‘%keyword%’ > > I optimized the first type of queries making partitions with every > letter that a name can begin with: AFAIK, you only need to add an index on "name" to be able to speed up the first kind of queries. Have a look at B-Tree description in [1]. - Jonathan [1] : http://www.postgresql.org/docs/8.3/interactive/indexes-types.html
В списке pgsql-general по дате отправления: