Re: [gnome-db] gda_connection_update_meta_store() is slow

2008/12/16 Murray Cumming <murrayc murrayc com>
On Tue, 2008-12-16 at 11:46 +0100, Vivien Malerba wrote:
> You can request only a artial update of the meta store for the tables
> in which you are interrested:

But it doesn't seem to let us discover the list of tables without
getting the full information for all tables.

Oh, I see in your example that you specifically mention a "table_schema"
table. Is that documented somewhere, or is that Postgres-specific?

It's not Postgres specific. The GdaMetaContext acts as a filter to specify what table (in the meta store's internal db) needs to be updated.

In the example, that filter is on the "_tables" table, and for a column named "table_schema", which means we want to update the contents of the "_tables" table (which lists all the tables and views in the database, refer to limiting the update to the tables in the schema named as argv[1].

Please note that in order to keep the meta store's internal db in a coherent state, Libgda will also itself update the contents of all the related tables, either for the depending tables (such as the "_columns" and "_views" tables here) or the tables on which "_tables" depend (such as "_schemata" here).

I know the documentation about this needs some work and it's on my TODO list.


Side note: I don't know how Glom is structured, but you could have the meta data stored permanently so you'd only have to update the meta store when you modify the database's object's definition, which would improve performances. You could also update the meta store in a thread other than the main one so your UI remains responsive.

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