Welcome to WebmasterWorld Guest from 54.167.83.224

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Mysql large database problem

     
4:45 pm on Mar 22, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Apr 12, 2007
posts:134
votes: 0


i have come across an interesting problem when..i have to maintain an enormous size of mysql database(actually the number of rows are supposed to be very big)...now the objective is to insert hundreds of new data once to the mysql database ...also it has to be checked that those data are already not there in database...for example

mysql database contains numbers like (2d, 4f,3f5 ,5h2, j5,4l4,2i4,42,44,d4.....and so on....)

and i have to insert one array (34,2d,fdf3,dd,434,f4)...Here "2d" element is already in above database so it must be neglect during insertion....How can i do this in best way without too much over stretching server resource...are their any php function which can do this directly

thank in advance

5:19 am on Mar 23, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 0


If you make the column in the table UNIQUE then it will not allow you to insert the same value twice, it will generate an error which you can then handle accordingly.
6:09 am on Mar 23, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Apr 12, 2007
posts:134
votes: 0


Thanks eelixduppy

i tried the solution suggested by you and it worked ....i think this could be the best way to do it efficiently