15,792,539 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Python questions
View PHP questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by glitteringsound (Top 4 by date)
glitteringsound
24-Dec-16 16:15pm
View
Hwo would SQL server will knwo what child belongs to which parent?
and how many children are there for specific parent in this case, If I save parent and children seperately. For example Consignment1 has 4 ConsignmentLines, 3 ConsignmentAddresses, while other consignment has 2 Consignmentlines and 5 ConsignmentAddresses
glitteringsound
24-Dec-16 14:54pm
View
Previously I used entity framework for saving 100K rocords in database where each recod further contains child records.
my object hierarchy is :
public class Consignment
{
....
List<consignmentaddress> addresses {get; set;}
List<consignmentline> lines { get; set; }
}
I could expect Consignments Count = 100K and each Consignment could contain 2 ConsignmentLines and on average 3 Consignment Addresses.
So this all makes roughly = 100K + 200K + 300K = 600K records .
For inserting all these 600K records, I used entity framework and this was damn slow. Then I devided the file in chunks and parse 1000 records and inserted using EF by recreating context each time. This was very improved . But still that does not full fill my requirement ( as in future i could expect 500K root level records and each further could contain 3-4 child record in each list. That could make 1200K records in database).
Now I need fast and efficient solution.
That's why I want to send the whole hierarchy at once, so that i can iterate that collection inside SQL and insert the parent child records. As this would be close to metal , it would be 10 times faster than entity framework.
But at the moment, I am iterating this List<consignment> collection from .NET C# in loop and for each consignment, along with it's children ( i.e List<consignmentaddress>, List<consignmentline> ), I am calling stored procedure and sending these 3 as TVP ( 1 for Consignment, 2nd for List<consignmentaddress>, 3rd for List<consignmentline> ). This procedure is also very slow. Because, for 100K root records, 100K stored procedure calls are going.
Now I need a solution, which takes the whole hierarchy or at least some chunk and push all the data at once by keeping whole parent child relationship intact.
glitteringsound
10-May-11 3:06am
View
Ok I googled. This will create directories on my disk here. What it has to do with my problem? How creating the directory will actually solve my problem?
glitteringsound
10-May-11 3:02am
View
What do you mean by directory class? How can it be implemented?