By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,045 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

how to move the data ,because of the partition table

P: 15
i am so sorry! the english is not my mother language.
but i need everyone help actually.

it takes 16 seconds to query the this sql
SELECT count(*) FROM Sold_Listing_V as slv WHERE slv.Is_Paid ='1'

so , we ask for help

the sold_listing_v is a View ,

SELECT item_t.item_ebay_id, userinfo.user_ebay_id, item_t.list_type, item_t.title AS item_title, item_t.is_second_chance, item_t.sub_title, item_t.duration, item_t.start_time, item_t.quantity, item_t.header_pic_url, item_t.end_time, item_t.parent_item_ebay_id, item_t.bin_price, item_t.start_price, item_t.reserve_price, item_t.post_site, wd_t.winner_detail_id, wd_t.is_shipping_notification, wd_t.quantity AS winner_quantity, wd_t.transaction_id, wd_t.winner_ebay_id, wd_t.is_paid, wd_t.left_feedback_score, wd_t.received_feedback_score, wd_t.is_invoice, wd_t.is_contact, item_t.counter_style, wd_t.is_shipped, wd_t.winning_price, bidder_t.bidder_ebay_id,, bidder_t.shipping_address, bidder_t.feedback_score, userinfo.user_ebay_info_id, userinfo.user_id, wd_t.quantity AS wdquantity, odt.order_id, odt.order_detail_id, note.note_content
FROM winner_detail_t wd_t
LEFT JOIN item_t ON item_t.item_ebay_id::text = wd_t.item_ebay_id::text
LEFT JOIN transaction_note_t note ON note.winner_detail_id = wd_t.winner_detail_id
LEFT JOIN user_ebay_info userinfo ON userinfo.user_ebay_info_id = item_t.user_ebay_info_id
LEFT JOIN bidder_t ON bidder_t.bidder_ebay_id::text = wd_t.winner_ebay_id::text
LEFT JOIN order_detail_t odt ON odt.winner_detail_id = wd_t.winner_detail_id;

the record number of the item_t , winner_detail_t is very large.

so ,we decided to create partition table .

which steps should we do take ?

because these tables have constraint keys ,they reference each other.
how should we to move the data in these tables , move these data from parent tables to

sub tables .

if the step 1, and step 2 was completed scuessfully ,
but the view sold_listing_v , may be not right ,because of the patition tables.

how should we change this sql to create a view
Sep 11 '07 #1
Share this Question
Share on Google+
2 Replies

P: 15
can anyone help me ?
Sep 14 '07 #2

P: 15
please help me .
can anyone help me?
Sep 20 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.