MySQL Forums
Forum List  »  Partitioning

Re: Create Temporary Table from Partitioned Table
Posted by: Aftab Khan
Date: March 19, 2009 05:09AM

Questions

show create table...
and the query you tried to create temporary table?

Examples:

mysql> explain partitions select * from order where order_date between '2008-01-01 00:00:00' and '2008-12-01 00:00:00';
+----+-------------+-----------+------------+------+---------------+------+---------+------+--------+-------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-----------+------------+------+---------------+------+---------+------+--------+-------------+
| 1 | SIMPLE | order | p2008 | ALL | order_date | NULL | NULL | NULL | 311145 | Using where |
+----+-------------+-----------+------------+------+---------------+------+---------+------+--------+-------------+
1 row in set (0.00 sec)

mysql> create temporary table sop_order_t select * from order where order_date between '2008-01-01 00:00:00' and '2008-12-01 00:00:00';
Query OK, 113830 rows affected (2.03 sec)
Records: 113830 Duplicates: 0 Warnings: 0

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Create Temporary Table from Partitioned Table
2988
March 19, 2009 05:09AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.