pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Table size - optimization
2+ messages / 2 participants
[nested] [flat]

* Table size - optimization
@ 2015-12-14 04:35 drum.lucas@gmail.com <drum.lucas@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: drum.lucas@gmail.com @ 2015-12-14 04:35 UTC (permalink / raw)
  To: pgsql-admin

Feedlog is a central area where theres been a lot of data dumped together
and the beast has grown.

Whats a better way to design the db table(s) for feedlog so we can get a
very large performance gain.

Is there a way we can create a feedlog-history table or yearly tables eg
feedlog-2014 and move old data out of the original table so its a kean fast
table?

What code would need to change to deal with that?

*Some data :*

Size: 8 GB

relname      | relkind |  reltuples  | relpages
-------------------+---------+-------------+----------
 feedlog        | r       | 6.60508e+07 |  9974857




Thanks,
Lucas

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Table size - optimization
@ 2015-12-14 11:24 Marius <lonepsycho@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Marius @ 2015-12-14 11:24 UTC (permalink / raw)
  To: drum.lucas@gmail.com <drum.lucas@gmail.com>; pgsql-admin

You could simply rename old table, create new one and all in same transaction. No data move required.

-----Original Message-----
From: drum.lucas@gmail.com
Sent: 2015.12.14 06:37
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Table size - optimization


Feedlog is a central area where theres been a lot of data dumped together and the beast has grown.




Whats a better way to design the db table(s) for feedlog so we can get a very large performance gain.




Is there a way we can create a feedlog-history table or yearly tables eg feedlog-2014 and move old data out of the original table so its a kean fast table?




What code would need to change to deal with that?




Some data :





Size: 8 GB

      



relname      | relkind |  reltuples  | relpages

-------------------+---------+-------------+----------

 feedlog        | r       | 6.60508e+07 |  9974857













Thanks,

Lucas
 =

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-12-14 11:24 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-12-14 04:35 Table size - optimization drum.lucas@gmail.com <drum.lucas@gmail.com>
2015-12-14 11:24 Re: Table size - optimization Marius <lonepsycho@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox