On Sun, 20 Feb 2005, Phil Endecott wrote:
> Dear Postgresql experts,
>
> I have a single database with one schema per user. Each user has a handful
> of tables, but there are lots of users, so in total the database has
> thousands of tables.
>
> I'm a bit concerned about scalability as this continues to grow. For example
> I find that tab-completion in psql is now unusably slow; if there is anything
> more important where the algorithmic complexity is the same then it will be
> causing a problem. There are 42,000 files in the database directory. This
> is enough that, with a "traditional" unix filesystem like ext2/3, kernel
> operations on directories take a significant time. (In other applications
> I've generally used a guide of 100-1000 files per directory before adding
> extra layers, but I don't know how valid this is.)
Please read the following linux-kernel thread (October 2002):
http://www.ussg.iu.edu/hypermail/linux/kernel/0210.0/0281.html
they are comparing Ext3 and RaiserFS directory operations, with 300,000
files. They are head to head. I doubt you can measure any difference
with 42,000 files, provided that the kernel you're running isn't too
old. Please note that as far as PostgreSQL is concerned, CPU usage
is more important than raw speed in tests, IMHO. And I bet both the
filesystems have improved since then.
Now I wonder, is tab-completion faster in Oracle? B-)
.TM.
--
____/ ____/ /
/ / / Marco Colombo
___/ ___ / / Technical Manager
/ / / ESI s.r.l.
_____/ _____/ _/ Colombo@ESI.it