<div>Hi!<br></div><div><br></div><div>I want to test my program that coded into PGSQL, and PySQLite. With these DBs I have problem on many blob deletion (2 hours) and compact/vacuum (1 hours)...</div><div><br></div><div>So I'm trying to port my program, and before that making a test to check, which time needs to delete 1 GB of blobs.</div>
<div><br></div><div>I installed MySQLDb from the exe (Py2.6, from stackoverflow version), set all parameters, etc.</div><div><br></div><div>import MySQLdb<br><br>conn = MySQLdb.connect (host = "localhost",<br>                       user = "root",<br>
                       passwd = "",<br>                       db = "db")<br>cursor = conn.cursor ()<br>cursor.execute ("SELECT VERSION()")<br><br>cursor.execute('delete from blobs;')<br>
<br>s = time.time()<br>for i in range(200):<br>     k = str(i)<br>     xbuffer = chr(65 + (i % 26))<br>     xbuffer = xbuffer * 1024 * 1024<br>     b = MySQLdb.escape_string(xbuffer)<br>     print len(b)<br>     cursor.execute('''insert into blobs<br>
          (blob_id, file_id, size, ext, data)<br>          values<br>          (%s, %s, %s, %s, %s)''', (i, i, -1, 'org', b))<br>     conn.commit()<br>e = time.time()<br>t = e - s<br>print t<br><br>sys.exit()<br>
</div><div><br></div><div>When I tried to start this, I got error:</div><div><br></div><div>_mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')</div><div><br></div><div>I read that server have some parameter, that limit the Query length.</div>
<div><br></div><div>Then I decreased the blob size to 1M, and then it is working.</div><div><br></div><div>But: I can insert 800k-1,9 MB blobs.</div><div><br></div><div>I tried to set this parameter, but nothing changed.</div>
<div>My.ini:</div><div><br></div><div># SERVER SECTION<br># ----------------------------------------------------------------------<br>#<br># The following options will be read by the MySQL Server. Make sure that<br># you have installed the server correctly (see above) so it reads this <br>
# file.<br>#<br>[mysqld]<br><br>max_allowed_packet = 16M<br><br># The TCP/IP Port the MySQL Server will listen on<br>port=3306<br></div><div><br></div><div>What is the problem? What I do wrong?</div><div><br></div><div>Thanks for your help:</div>
<div>   dd</div>