Re: [PHP-DB] Moving data from one MySQL table to another

2005-05-20 Thread lmorales
Try do that whit phpmyadmin.

Regards,

Luis Morales


Bastien Koert wrote:

> if the archive tables structures are identical and no processing needs
> to be done, why not use a 'select into table where ' and use the ids
> of the records to choose the ones that move?
>
> Bastien
>
>> From: Jeffrey <[EMAIL PROTECTED]>
>> To: php-db@lists.php.net
>> Subject: [PHP-DB] Moving data from one MySQL table to another
>> Date: Thu, 19 May 2005 15:19:48 +0200
>>
>> I'm working on a web application and one of the things I am doing is
>> creating an archiving function that would move older data to archive
>> tables in order to minimise the amount of data in the  active tables.
>> This so that the data that is being used more frequently can be
>> accessed faster by the users.
>>
>> My approach in building the archive function is:
>>
>> 1) SELECT query on the data
>> 2) mysql_fetch_array to put the data into an array
>> 3) INSERT subqueries to put the data into the archive tables.
>>
>> My concern is that in some cases, hundreds of rows of data would need
>> to be moved  - which could lead to awfully big arrays. However, the
>> archiving function is likely to be used infrequently - not more than
>> 1 or 2 times per week.
>>
>> This leads to two questions:
>>
>> 1) Could such a big array cause performance problems or worse?
>> 2) Is there a better way?
>>
>> Many thanks,
>>
>> Jeff
>>
>> -- 
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




**

IMPORTANT NOTICE

This communication is for the exclusive use of the intended recipient(s)
named above. If you receive this communication in error, you should
notify the sender by e-mail or by telephone (+44) 191 224 4461, delete
it and destroy any copies of it.

This communication may contain confidential information and material
protected by copyright, design right or other intellectual property
rights which are and shall remain the property of Piranha Studios
Limited. Any form of distribution, copying or other unauthorised use
of this communication or the information in it is strictly prohibited.
Piranha Studios Limited asserts its rights in this communication and
the information in it and reserves the right to take action against
anyone who misuses it or the information in it.

Piranha Studios Limited cannot accept any liability sustained as a
result of software viruses and would recommend that you carry out your
own virus checks before opening any attachment.


<<<>>>AdmID:84C6C264C6C7D86D3F3BA4CBCEEC1D4C



**

IMPORTANT NOTICE

This communication is for the exclusive use of the intended recipient(s)
named above. If you receive this communication in error, you should
notify the sender by e-mail or by telephone (+44) 191 224 4461, delete
it and destroy any copies of it.

This communication may contain confidential information and material
protected by copyright, design right or other intellectual property
rights which are and shall remain the property of Piranha Studios
Limited. Any form of distribution, copying or other unauthorised use
of this communication or the information in it is strictly prohibited.
Piranha Studios Limited asserts its rights in this communication and
the information in it and reserves the right to take action against
anyone who misuses it or the information in it.

Piranha Studios Limited cannot accept any liability sustained as a
result of software viruses and would recommend that you carry out your
own virus checks before opening any attachment.


<<<>>>
-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Moving data from one MySQL table to another

2005-05-19 Thread Luis Morales
Try do that whit phpmyadmin.

Regards,

Luis Morales


Bastien Koert wrote:

> if the archive tables structures are identical and no processing needs
> to be done, why not use a 'select into table where ' and use the ids
> of the records to choose the ones that move?
>
> Bastien
>
>> From: Jeffrey <[EMAIL PROTECTED]>
>> To: php-db@lists.php.net
>> Subject: [PHP-DB] Moving data from one MySQL table to another
>> Date: Thu, 19 May 2005 15:19:48 +0200
>>
>> I'm working on a web application and one of the things I am doing is
>> creating an archiving function that would move older data to archive
>> tables in order to minimise the amount of data in the  active tables.
>> This so that the data that is being used more frequently can be
>> accessed faster by the users.
>>
>> My approach in building the archive function is:
>>
>> 1) SELECT query on the data
>> 2) mysql_fetch_array to put the data into an array
>> 3) INSERT subqueries to put the data into the archive tables.
>>
>> My concern is that in some cases, hundreds of rows of data would need
>> to be moved  - which could lead to awfully big arrays. However, the
>> archiving function is likely to be used infrequently - not more than
>> 1 or 2 times per week.
>>
>> This leads to two questions:
>>
>> 1) Could such a big array cause performance problems or worse?
>> 2) Is there a better way?
>>
>> Many thanks,
>>
>> Jeff
>>
>> -- 
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Moving data from one MySQL table to another

2005-05-19 Thread Bastien Koert
if the archive tables structures are identical and no processing needs to be 
done, why not use a 'select into table where ' and use the ids of the 
records to choose the ones that move?

Bastien
From: Jeffrey <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] Moving data from one MySQL table to another
Date: Thu, 19 May 2005 15:19:48 +0200
I'm working on a web application and one of the things I am doing is 
creating an archiving function that would move older data to archive tables 
in order to minimise the amount of data in the  active tables. This so that 
the data that is being used more frequently can be accessed faster by the 
users.

My approach in building the archive function is:
1) SELECT query on the data
2) mysql_fetch_array to put the data into an array
3) INSERT subqueries to put the data into the archive tables.
My concern is that in some cases, hundreds of rows of data would need to be 
moved  - which could lead to awfully big arrays. However, the archiving 
function is likely to be used infrequently - not more than 1 or 2 times per 
week.

This leads to two questions:
1) Could such a big array cause performance problems or worse?
2) Is there a better way?
Many thanks,
Jeff
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Moving data from one MySQL table to another

2005-05-19 Thread Jeffrey
I'm working on a web application and one of the things I am doing is 
creating an archiving function that would move older data to archive 
tables in order to minimise the amount of data in the  active tables. 
This so that the data that is being used more frequently can be accessed 
faster by the users.

My approach in building the archive function is:
1) SELECT query on the data
2) mysql_fetch_array to put the data into an array
3) INSERT subqueries to put the data into the archive tables.
My concern is that in some cases, hundreds of rows of data would need to 
be moved  - which could lead to awfully big arrays. However, the 
archiving function is likely to be used infrequently - not more than 1 
or 2 times per week.

This leads to two questions:
1) Could such a big array cause performance problems or worse?
2) Is there a better way?
Many thanks,
Jeff
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php