RE: [PHP-DB] Seperate Tables for Same Data?

2001-08-30 Thread Walter, Marcel

Which database do you use ?

I donĀ“t know mySql ... but I know Sybase very well and there you have
something called Triggers ...

[Cite SybaseDoc]
A trigger is a stored procedure that goes into effect when you insert,
delete, or update data in a table
[/CITE]

You could say for example
Create trigger for blahblah on insert 
as
begin
   take the inserted recordset and put it in another table ...
end

Cheers,
Marcel

> -Original Message-
> From: jv [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, August 30, 2001 17:44
> To:   [EMAIL PROTECTED]
> Subject:  [PHP-DB] Seperate Tables for Same Data?
> 
> Greetings,
> 
> I am setting up two seperate tables that will hold identically INSERTed
> data. The reason for this is that one table will hold data that will
> expire
> by timestamp daily and the other will hold the very same data for later
> manipulation.
> 
> Is sending identical data like this to two seperate tables a good practise
> or is there a better way?
> 
> Thanks,
> 
> James
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Seperate Tables for Same Data?

2001-08-30 Thread Justin Buist

I'd suggest only inserting data into the "working" table throughout the
day, then on a nightly basis drop the index on the archived table, import
the data from the working table into the archived one, re-create the
index and clear out your working table.

As time goes on that archived table is going to get huge and you don't
want your DB trying to insert into something like that during production
hours.  Better off waiting for some downtime where you can batch the whole
thing in there.

Just my two cents.

Justin Buist
Trident Technology, Inc.
4700 60th St. SW, Suite 102
Grand Rapids, MI  49512
Ph. 616.554.2700
Fx. 616.554.3331
Mo. 616.291.2612

On Thu, 30 Aug 2001, jv wrote:

> Greetings,
>
> I am setting up two seperate tables that will hold identically INSERTed
> data. The reason for this is that one table will hold data that will expire
> by timestamp daily and the other will hold the very same data for later
> manipulation.
>
> Is sending identical data like this to two seperate tables a good practise
> or is there a better way?
>
> Thanks,
>
> James
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]