Re: Scalability with large numbers of tables

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Scalability with large numbers of tables
Date: 2005-02-21 12:55:27
Message-ID: 37u41vF5e6768U2@individual.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm pretty sure that slowness of tab completion has little to do with
the performance of the filesystems.

If you've got tens of thousands of relations, the tab completion code
has to draw the whole list of relations from pg_class into memory and
"marshal" it into a form usable by GNU Readline. THAT is what you're
seeing slow down. As the number of tables, n, grows, the cost of that
grows with order of complexity O(n).

Actual queries on actual tables won't be slow; they will look up
relation names directly in pg_class, and presumably go from there to
get the file name(s) on the filesystem, which each represent
operations of complexity of order O(n log n). Which remains fast even
if
--
(format nil "~S(at)~S" "cbbrowne" "gmail.com")
http://linuxdatabases.info/info/slony.html
It isn't that physicists enjoy physics more than they enjoy sex, its
that they enjoy sex more when they are thinking of physics.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Hartmann 2005-02-21 13:52:22 Different execution time from psql and JDBC
Previous Message Markus Wollny 2005-02-21 12:46:33 Re: Ways to speed up dump&reload