473,379 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

table size

I have a table in my database which can grow very quickly. Is
there some way to partition the table so that when it reaches a certain size the
information in it is copied to a temporary table and the
original table is free again.

Or is this possible at all. If not is there any sort of perfomance
update I can add to speed up the queries on such a large table.

thanks

D

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 11 '05 #1
3 4034
Hi David,

I'd say that if it is a new app develop it with 7.4 and use statement level
triggers otherwise you could use normal triggers and perform a count each
time but that will slow things down dramatically.

Other option is to use cron and write a daemon/script to periodically check
the size of the table. Without statement level triggers this would probably
be the most efficient.

Rgds,

Jason

On Tue, 23 Sep 2003 07:35 pm, David McLoughlin wrote:
I have a table in my database which can grow very quickly. Is
there some way to partition the table so that when it reaches a certain
size the information in it is copied to a temporary table and the
original table is free again.

Or is this possible at all. If not is there any sort of perfomance
update I can add to speed up the queries on such a large table.

thanks

D

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 11 '05 #2
Hi,
I have a table in my database which can grow very quickly. Is
there some way to partition the table so that when it reaches a certain
size the
information in it is copied to a temporary table and the
original table is free again.


You can create a view and update the view definition periodically to
add/remove tables from view definition. Your data insertion should be
pointed to a new table after specific period.

That way you can achieve table partitioning. Since DDLs in postgresql are
transactable, it should be absolutely transparent to the application and
other users.

HTH

Shridhar

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #3
On Tue, Sep 23, 2003 at 10:35:57 +0100,
David McLoughlin <dm*********@sherkin.com> wrote:
I have a table in my database which can grow very quickly. Is
there some way to partition the table so that when it reaches a certain
size the information in it is copied to a temporary table and the
original table is free again.

Or is this possible at all. If not is there any sort of perfomance
update I can add to speed up the queries on such a large table.


You can use partial indexes to only index a subset of the data. This
may be good enough for your needs. You will need to create new
partial indexes periodicly (and maybe remove old ones to save space).

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Craig | last post by:
I have a 3rd party product that is quite old. It produces reports dynamically via the web. It users templates to do this. They are very basic, one looks like this. <html> <head>
11
by: Norman L. DeForest | last post by:
Am I misunderstanding the CSS specifications or is Firefox (version 1.0.6) (and Opera) doing the wrong thing? It appears that Firefox 1.0.6 includes the border in width calculations for tables...
10
by: Bing Wu | last post by:
Hi Folks, I have a problem while creating a big table space. It reports error: SQL1139N The total size of the table space is too big Explanation: The size of the current table space is too...
15
by: kimi | last post by:
I have just started working on a project that is partially complete. It is an application that is using access to store test results. The test results are being stored in two Access 2000 databases....
7
by: Shawn B. | last post by:
Greetings, I am trying to create a table that has a scrolling body. The problem I'm experiencing is that if the columns in the "body" part of the table exceed the width of the "header" then...
8
by: Ron | last post by:
Hi all, How do I determine the size of the tables I'm using? I looked under properties and it's not there. The book I just browsed said table is limited to 1GB. How do I find out what size my...
6
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called...
3
by: acecraig100 | last post by:
I am fairly new to Javascript. I have a form that users fill out to enter an animal to exhibit at a fair. Because we have no way of knowing, how many animals a user may enter, I created a table...
1
by: MissMarie | last post by:
I've been playing around with DIV tables in myspace to better learn how to rewrite my own code for my business site without having to pay someone to design it. I've tried embedding a slideshow into...
139
by: ravi | last post by:
Hi can anybody tell me that which ds will be best suited to implement a hash table in C/C++ thanx. in advanced
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.