Re: [NOVICE] [PERFORM] Extreme high load averages
Shridhar Daithankar wrote: I have an idea. How about creating a table for each day. Use it for a while and rename it. Since you can rename a table in transaction, it should not be a problem. You can use inheritance if you want to query all of them. Using indexes and foregin keys on inherited tables is a problem though. That way deletion would be avoided and so would vacuum. It should be mich lighter on the system overall as well. Tell us if it works. Bye Shridhar Generally I won't be pulling 250K rows from that table. It's maintained nightly during the general cleanup process where stale users, rooms and posts are removed from the system. Then the system runs a normal VACUUM ANALYSE to get things going again smoothly. Once a week a more detailed archiving takes place which runs an all out vaccume and re-index.That's the so called plan at least. As for creating a new table, that in itself is a nice idea. But it would cause issues for people currently in the realm. Their posts would essentially dissapear from site and cause more confusion then its worth. Inheritance would work, but the database would essentially just grow and grow and grow right? BTW, I can't thank you all enough for this general advice. It's helping me get this thing running very smoothly. Martin Foster Creator/Designer Ethereal Realms [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [NOVICE] [PERFORM] Extreme high load averages
On 10 Jul 2003 at 0:43, Martin Foster wrote: > As for creating a new table, that in itself is a nice idea. But it > would cause issues for people currently in the realm. Their posts > would essentially dissapear from site and cause more confusion then its > worth. No they won't. Say you have a base table and your current post table is child of that. You can query on base table and get rows from child table. That way all the data would always be there. While inserting posts, you would insert in child table. While qeurying you would query on base table. That way things will be optimal. > Inheritance would work, but the database would essentially just grow and > grow and grow right? Right. But there are two advantages. 1. It will always contain valid posts. No dead tuples. 2. You can work in chuncks of data. Each child table can be dealt with separately without affecting other child tables, whereas in case of a single large table, entire site is affected.. Deleting 100K posts from 101K rows table is vastly different than deleting 10K posts from 2M rows table. Later one would unnecessary starve the table with dead tuples and IO whereas in former case you can do create table as select from and drop the original.. HTH Bye Shridhar -- "[In 'Doctor' mode], I spent a good ten minutes telling Emacs what Ithought of it. (The response was, 'Perhaps you could try to be lessabusive.')"(By Matt Welsh) ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html