- This topic is empty.
-
AuthorPosts
-
July 5, 2014 at 3:08 pm #174757RohithzrParticipant
previous linked post
https://css-tricks.com/forums/topic/large-loop-of-mysql-queries/I want to insert a 100,000 queries into a table, statement would be complicated. I have thought of making a text file to insert data. Probably through 4 or 5 files. I have also searched the internet and found various suggestions:
- Try locking table before starting insertion and then unlock. [I’ll Probably block whole site for a couple of hours as i can chose the time of insert and have to it once a month.]
-
Disable MySQL indexes. [Dont know how will it help]
-
Use Stored Procedures. [My query will be very complicated]
-
Batch Insert [Your Suggestion]
-
a (single or few) [.csv] files
-
a text file stored with queries and run it in mysql
I need Suggestion and help in proceeding as i am no database administrator
And I have a BigRock VPS Server. And ill probably stop the server during the transaction.0.88 GHz 512 MB RAM 20 GB HDD 500 GB Transfer 1 Free IP
July 5, 2014 at 3:46 pm #174759__ParticipantWhere is the data coming from?
Is this a single, atomic transaction, or is it 100,000 individual (unrelated) records?
Is this question directly related to our previous conversation, or is it a different issue? Regarding our last conversation, have you managed that issue? Have you decided if you’re going to hire a DBA?
July 5, 2014 at 11:49 pm #174773RohithzrParticipantI think i should have written this before.
first i will
select (cId, pack_amt, opId) from customers
then foreach cId i will check if there is a payment entry this month
if yes the continue
else check if there is any advance payment
if no
do a normal Insert Into entry
else if yes
treat the advance amount accordingly
and insert the entryJuly 5, 2014 at 11:53 pm #174774RohithzrParticipantWhere is the data coming from?
just told in last post above
Is this question directly related to our previous conversation, or is it a different issue?
Yes it is the same issue
Regarding our last conversation, have you managed that issue?
i had postpone the issue due to other more important works so havn’t really tried but read your suggested article on procedures but as i said it will be complicated.
Have you decided if you’re going to hire a DBA?
I cant really hire a DBA as me and my firm is not earning that much.
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.