Jump to content

Search the Community

Showing results for tags 'array dml'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 2 results

  1. Dmitry Onoshko

    FireDAC array DML and AbortJob

    I have a large set of data to insert into a MySQL/MariaDB table. For now I decided to use FireDAC’s array DML feature, so I create a TFDStoredProc, feed it with all the data and call Execute method (all the stuff in a TTask to avoid hanging the UI). Now when the user wants to close the application, the task should obviously be interrupted to prevent the application from hanging in the processes list for quite a long time. So, from the UI thread (say, TForm.OnCloseQuery, doesn’t really matter) I call TFDConnection.AbortJob on the connection I’ve assigned to the TFDStoredProc before executing it. The problem is that AbortJob raises an exception: So, the array DML query doesn’t get aborted, the program stays hanging until the TDStoredProc.Execute returns. Has anyone ever had such problem? Any help is appreciated.
  2. Hi, I am trying to rewrite a piece of legacy code which inserts a number of records in a bulk to SQL server tables(Total number of lines is around 200000 across 15 tables). Currently it uses ADO query to insert multiple records one by one. If the number of records are too high then this process takes a lot of time. I was trying to make it faster and came across FireDAC array DML and according to the documentation, inserting 100000 records can be done less than a second! So I implemented it and in my development machine (where application and database resides) it improved a lot. From 8 minutes to less than a minute. But when I tested it on a test environment where application and database resides on different machines connected by a network, performance is worse. (It was taking 10 minutes with ADO and with array DML it takes 15 minutes) I can't figure it out why array DML insert is taking more time than normal record by record insert. Any ideas? Delphi version: Delphi 10.4 SQL Server: 2017 SQL Driver: ODBC DRIVER 17 FOR SQL SERVER Kind regards, Soji.
×