On Fri, Oct 26, 2007 at 08:25:09AM +0200, Thomas Finneid wrote: > Gregory Stark wrote: > >Tom's point is that if you have 55k tables then just *finding* the newest > >child table is fairly expensive. You're accessing a not insignificant-sized > >index and table of tables. And the situation is worse when you consider the > >number of columns all those tables have, all the indexes those tables have, > >all the column keys those indexes the tables have have, etc. > > Yes, I got that. But I name the child tables so that I when my server > receives read requests, I retreive details from the request to be able > to figure out the exact child table name, without the system needing to > do any internal searches to find the newest table. I think the lookup that is being referred to is the fact that if you've got 55k (plus) files in a directory then the filesystem still has to perform a search in the directory to locate the actual file associated with the filename. There probably isn't going to be much difference between the filesystem performing this lookup vs the database descending a few levels of its index structure. I have a feeling you may have thought about this before, but thought it wouldn't hurt to point it out more explicitly. Sam ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match