« Previous Next »

Thread: SQL Output : Why "Select * [...]" before inserting ? --> Memory pb with big database

Last post 02-02-2008 1:27 PM by Hoplebus. 0 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (1 items)

Sort Posts:

  • 02-02-2008, 1:27 PM

    • Hoplebus
    • Not Ranked
    • Joined on 02-02-2008, 12:44 PM
    • Posts 1

    SQL Output : Why "Select * [...]" before inserting ? --> Memory pb with big database

    Hi,

    I'm a long time LP user and I'm faced with a strange behaviour when outputing to SQL.

    I'm using LP v2.2, Mysql v5.1 and MySQL ODBC Connector v3.51.

    I'm uploading parsed results to a MySQL DB. 

    The destination table already contains ~1GB of data.

    When LP finishes parsing and just before uploading recordsets to the DB, it looks like it first issues a "Select * from OutputTable"

    --> memory consuption explodes and LP exists (in fact the error message comes from the ODBC connector) with an "out of memory error".

    I diagnosed the "Select *" query by setting up "Tracing" in Windows ODBC administrative pannel and analysing the SQL.log file. I too can see this query on the server side.

    The params of the SQL output are :

    createTable : off

    clearTable : off

    I tried to play around with the other SQL output params without success.

    I see no obvious need to launch such a query before issuing the Inserts.

    I have 2 workarounds that consists in :

    - getting the recordsets from LP and issuing myself the Inserts using ADO, but as I'm using VBScripts, I imagine that performance will be very poor and my script will have to keep the parsed result in memory before uploading it to the DB.

    - output a TSV file (tab separator) and issue a "LOAD DATA INFILE" to bulk load it into Mysql, but this is more complex and not portable at all...

     

    In fact, I don't know if it's LP who is explicitly issuing the "Select *" query or if it is generated by the Mysql Connector.

    Could anyone "debug", say, LP inserting into SQL Server to see if it exhibits the same behaviour ?

    Has anybody an idea on how to solve that issue ?

     

    Thanks in advance !

Page 1 of 1 (1 items)
Microsoft Communities