Efficient map looking table

Поиск
Список
Период
Сортировка
От Yoann MOREAU
Тема Efficient map looking table
Дата
Msg-id 20120110224432.55686vbzcct9c85c@webmail.univ-avignon.fr
обсуждение исходный текст
Ответы Re: Efficient map looking table  ("David Johnston" <polobo@yahoo.com>)
Список pgsql-general
Hello, I store in a database some XML-tag data. I have one table for
the tag names with an int PK for each unique name (tag_names) and one
table for the tags (tags) where each row references a tag name. The
tag_names table is not big but the tags table is huge. When I insert a
row in tags I have to check if its tag name already exists to get its
id_tag_name and if not insert it in tag_names.

My question : is there an efficient way to check/get the tag_name,
it's doing the same job as a hashmap. I need it to be up to date in
the database when inserting new tag names, because different inserts
in tags table could occur at the same time, all checking for a tag
name. I then would need the whole tag_names table to be loaded in
memory and in the most "map" way as possible, is there anything
special to do ?

Thanks !
Yoann Moreau

В списке pgsql-general по дате отправления:

Предыдущее
От: Filip Rembiałkowski
Дата:
Сообщение: Re: string = any()
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: string = any()