Am Sonntag, 6. Januar 2008 19:49 schrieb Christian Hergert: > First of all, I went the route of writing a custom GtkTreeModel. This > way I had full control of tree iteration. You will probably want to > do the same. Especially since this allows lazy loading. > The reason why I used a pre-sorted query is that the sorting function for the tree view nodes is then executed in the RDBMS, which in turn lowers some CPU burden on the client side. The drawback of my solution, of course, is that it's no longer DBMS-independent because of the stored procedure. :-(
> For example: For the iter data, you could store the rows offset. In > PostgreSQL and SQLite, using the row OID works great as it is the > fastest way to access any record. However, using a system that allows > you to determine the next rows Iter data without a new query is > probably a good idea. If I remember correctly, I got my best > performance by mixing the two ideas; Batching queries to get the next > 10 rows OIDs. > DANGER: The newest PostgreSQL releases assign OIDs to individual rows only when you request it in the CREATE TABLE command. > You also may want a tunable cache to lower the number of queries. I > used a LRU which worked pretty decently . Just remember to expire > values on updates. > That's a good thing as you never know what the LAN performance of your customers is. :-/ Regards Jacek
pgprzDIp6tHIe.pgp
Description: PGP signature
_______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
