Search Postgresql Archives

Efficient map looking table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux