X-question about sqlserver!

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Microsoft SQL Server
Post Reply
Posts: 8
Joined: Mon 13 Apr 2020 21:20

X-question about sqlserver!

Post by khanh » Fri 06 Nov 2020 04:28

Hi, I'm creating my custom add-in with help from dotconnect sqlserver
I finished it but I want to ask if it could be even faster!
I have several tables that need to be queried in turn. (numbers of rows , columns and column data type are specified) so I only need to create a single table in specify datatbase .mdf file.
My steps are as follows:
step1: convert my table to datatable
step2: using devart.sqlscript to create table in .mdf file
step3: using devart.bulkcopy to add datatable
my question is:
1. Is there any faster method?
+, Can the above steps be more concise? (Is it possible to record quickly by skipping step 1 and write directly to step 3?)
+, Is there any devart tool (here I just know devartconnect) can do it better?
+, I just need to move the table to some database and query this table and want the fastest execution speed!
Is it best to use the .mdf file? What kind of database file should I choose?
If I use .dot connect, what tips and tricks do I have to speed up the fastest queries?
Thanks so much!
Last edited by khanh on Fri 06 Nov 2020 11:02, edited 1 time in total.

Site Admin
Posts: 9330
Joined: Thu 14 Aug 2008 12:44

Re: X-question about sqlserver!

Post by Shalex » Fri 06 Nov 2020 10:26

Please create a table with Devart.Data.SqlServer.SqlScript and load data with Devart.Data.SqlServer.SqlBulkCopy.

There is no description of SqlBulkCopy at https://www.devart.com/dotconnect/sqlserver/docs/ at the moment. We will add it. Actually, Devart.Data.SqlServer.SqlBulkCopy is a wrapper of System.Data.SqlClient.SqlBulkCopy. As a temporary workaround, refer to https://docs.microsoft.com/en-us/dotnet ... mework-4.8. A sample is here: viewtopic.php?t=39152.

Posts: 8
Joined: Mon 13 Apr 2020 21:20

Re: X-question about sqlserver!

Post by khanh » Fri 06 Nov 2020 10:39

Hi shalex,
I will try to change some settings.
Thanks for the confirmation!

Post Reply