I'm stumped on making my code that inserts data into my database efficent

as a part of a school thing I’m making a database that has a bunch of games and info about them and I’ll make a gui for it later, I want to make the code that takes my csv file (technically a text file with each column deliminated by a tab) efficient and scaleable, I’m streaming the rows with the csv module but I’ve coded the entire thing several times and I keep thinking I can do better. I have 2 columns that have many to many relationships with the main table and 3 that have many to one, I’ve already done the tables. Does anyone have any good recommendations on a good way of inserting the dataset into my database efficiently and saleably. The main thing I keep running into is getting the foreign id for my many to one relationship columns since I’d have to do a query asking for a specfic value which is (I think) really resource expensive to do and the only other work around is putting all the many to one tables into a map and using the map to get the ids but then I’m using too much ram

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.