Re: graphs in PostgreSQL

From: Brent Wood <b(dot)wood(at)niwa(dot)co(dot)nz>
To: "Ivan Yu(dot) Zolotukhin" <iz(at)itpeople(dot)ru>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: graphs in PostgreSQL
Date: 2005-10-16 19:56:53
Message-ID: 20051017085539.I99602@storm-user.niwa.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 13 Oct 2005, Ivan Yu. Zolotukhin wrote:

> Hello,
>
> I'm trying to organize storage and processing of a graph (pretty spare,
> 100,000 vertices and 5,000,000 edges) with PostgreSQL.
>
> I have two main problems:
> - standart problem of finding all shortest paths between two given vertices;
> - search thru vertices' properties with ordering by path lengths from
> given vertix.
>
> So, basically, I need to decide what additional data (some preprocessed
> data about a graph or indexes) I need to store, how to store it, and how
> maintain it when graph changes.
>
> It seems that the second problem (ordering by path length) requires to
> store all path lengths between all vertices pairs (roadmap), that is
> very expensive to maintain.
>

You might look at PostGIS, as it seems you essentially want to store
spatial data and this is a better tool for this purpose than the native
Postgresql spatial datatypes.

Brent Wood

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Peter 2005-10-16 20:04:53 searching array
Previous Message Chris Travers 2005-10-16 19:43:42 Re: PostgreSQL Gotchas