mysql :: ne tür eklerseniz?

0 Cevap php

Background

Ben temelde bir dizi var,

Bu dizi aşağıdaki formata sahip

Array
(
    [0] => Array
        (
            [co_id] => 1
            [co_fname] => First
            [co_lname] => Last
            [co_company] => Company
            [co_address] => Address
            [co_ddi] => ddinumber
            [co_mobile] => mobilenumber
            [co_fax] => 
            [co_email] => email@example.com
            [co_usms] => 1
            [co_ufax] => 0
            [co_uemail] => 1
            [a_id] => 3
        )
)

Ben bu dizinin üzerinde döngü yaşıyorum ve bazı uç ifadeler oluşturma.

Üç tablo, Message_email, Message_fax, Message_sms vardır.

Bir kişi 1 olarak co_u (sms / faks / e-posta) varsa ben rehber id eklemek, ve ilgili dizi ($ mobil / $ faks / $ sms) ile ilgili iletişim bilgileri (co_mobile / co_fax / co_email).

The array's information is then added to the tables.


Question

Bu diziler (200k + kişileri düşünüyorum) oldukça büyük alabilirsiniz.

I. gerekir

a) Create a single bulk insert statement.
b) Create several smaller bulk insert statements.
c) Do an insert statement for each contact.

Speed is good but not so much of an issue. Reliability is the big one.

Mat

0 Cevap