Hi,
I have a task to write query to create records then link to its parent and make my query work real time.
On my recent project, i created a console application to accomplish that. This console application is run every 5 mnt using windows scheduler.
Based on description above, i need your suggestion for:
1. Write query with best performance when working with a lot of records
The number of records i work before is totally different then now. Now, the total parent records are around 500.000 records while my previouse project just around 5000 records.
When the child records want to link with it's parent, i need to search parent records by it's guid. The problem is i have to find one records Among 500,000 records. I worry about my code performance while working with those huge amount of records.
2. The way to make the application run real-time
By using windows sheduler, i can make it run every 5 mnt. But is there a way to make the console application run real time. I think about creating a custom plugin which trigger to run on create event. From inside this plugin, i call those console application. Is that possible ?
*This post is locked for comments
1 -> It's best to understand how indexes work in SQL server (here's an explanation: www.simple-talk.com/.../sql-server-index-basics) If you are getting are record by it's guid, that's will not impact performance, as this is the primary key of the entity.
2 --> You might want to look into change tracking. Maybe that's a better solution. msdn.microsoft.com/.../dn932130.aspx
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156