Skip to main content

All Questions

Tagged with
-1 votes
1 answer
252 views

Optimizing LINQ Query on C# Web API

Can someone help me optimize this code especially the LINQ query. It takes 8-12 seconds just to return a response when I'm calling the endpoint. Its super slow, and my whole endpoint call is taking ...
Kraust123's user avatar
2 votes
0 answers
81 views

Insert items from one table that do no exist in the other one [closed]

The insert query below must insert the items not present in the Articolo table by importing them from Importazione, and must update the items in the Articolo with those present in the Importazione. To ...
riki's user avatar
  • 153
6 votes
1 answer
5k views

Fastest way to insert rows in mysql vs sqlserver (large dataset)

I'm looking for any possible improvements that could be made to run the mysql piece of code faster. I created a simple test winform application that creates two docker databases : Sqlserver on linux ...
A_V's user avatar
  • 183
0 votes
2 answers
2k views

Insertion of big TXT file into Sql Server

The code posted below reads 500000 lines from a txt file and imports the lines read in a Sql Server 2014 database, the code works correctly but it takes too much time (even 40 minutes), especially ...
riki's user avatar
  • 153
2 votes
4 answers
2k views

C# SQL query builder to fill DataTable

I'm trying to optimize my code and in the process of doing that I made a class Query_builder that handles SQL queries. That class has couple of methods: ...
Marko Petričević's user avatar
2 votes
0 answers
64 views

Api occasionally slows down at runtime, possibly due SQL/connections

I'm currently working on an API that behaves incredibly unpredictable at runtime. Context: We run the same call 100 times without delay in between. A call can take anywhere from ~200 ms to ~5 seconds. ...
Gilles De Vylder's user avatar
1 vote
1 answer
217 views

Optimise MSSQL Connection .NET Helper Library

I recently posted my old .NET MSSQL Wrapper to be code reviewed: .NET MSSQL Wrapper I had some good feedback and based on that, I was able to re-factor it quite a bit and ended up with the following ...
Latheesan's user avatar
  • 303
1 vote
3 answers
191 views

Checking user access to servers

I have pasted a method I wrote, which is too slow to my liking (easily takes 60+ seconds to execute). The method loops through 12 different servers, checks if userX has access to any of the databases ...
GillesDV's user avatar
  • 155
2 votes
1 answer
122 views

Implementing SQL function STR

I am writing a piece of code in c# that mimics the behaviour of following SQL function STR in the following case: ...
NewtonCode's user avatar
2 votes
1 answer
552 views

Performance shifting for SQL Database and Linq memory grouping

I am messing around with shifting between stored procedures and business layer EF getting data rapidly then processing in memory. This works and on a static data range of 3 months I get execution ...
Piotr Kula's user avatar
1 vote
1 answer
120 views

Optimizing my program by accessing data locally instead of a remote database

I have a database with 4 tables filled with millions of rows. I have my program run on several computers computing data and then returning it to the database. The huge bottleneck in my program design ...
DarthVegan's user avatar
3 votes
2 answers
4k views

Divide certain distinct row values into separate columns

This might be difficult for me to describe clearly but I will try anyway. Also note that this is entirely speculative; it might not even be able to run any faster (that is why I am asking). This is ...
St0ffer's user avatar
  • 135
2 votes
1 answer
979 views

Improve speed of LINQ query

How can I improve the speed of this LINQ query? ...
Arkinghor's user avatar
3 votes
1 answer
539 views

DAL mapping efficiency

I am wondering if I can make these classes a bit more efficient. Test Results Single Run Method 1: 5 Columns - Text Query - 81178 Records = 00:00:00.6390366 secs Method 2: 5 Columns - Text Query - ...
Kevin's user avatar
  • 240
5 votes
3 answers
862 views

Lattitude document organizer

I'm not familiar with threads but I am not against them either. A bit of background the original program would have taken about 2 years to run. I had modified it and knocked down that time to around ...
James Wilson's user avatar

15 30 50 per page