C #: very fast search and retrieval of objects using any stability model

I am developing an application with Fluent nHibernat / nHibernate 3 / Sqlite. I had a very specific problem for which I need help.

I have a product database and a database. Production is about 100 thousand pieces, but at the moment the number of lots is about 11 million +. When you have a product, I need to fill Combobox in batches. Since I do not want to download all batches at the same time due to memory limitations, I load them when the product is provided directly from the database. But the problem is that sqlite (or maybe a combination of sqlite and nh) for this is a bit slower. It usually takes about 3 seconds to get packages for a specific product. Although this may not seem like a slow scenario, I want to know that I can improve this time? I need to get secondary results to make an order unprecedented.

Details:

  • New products and batches are periodically imported (once every two months).
  • Nothing in already stored products or packages is ever changed (No Update).
  • Saving products is not a problem. The main culprits are parties.
  • Product Identifiers long
  • Package Identifiers string
  • Lots contain 3 fields, speed, mrp (both decimal) and expiration ( DateTime).

Requirements:

  • Data must be stored in a file solution. I can not use the client-server approach.
  • Storage time is not important. Search time and search .
  • I am open to storing a package database using any other persistence model.
  • I am open to using anything like Lucene or a nosql database (like redis) or oodb, provided that they are based on the implementation of a single repository file.

Please suggest what I can use to quickly find objects.

Thank.

+3
3

, , 3+ .

?
Sqlite browser. 3 + ? - , , .

? , ? ? BeginUpdate EndUpdate.

3 ? , .

+1

, , , , (, , ) Batch Id Batch. .

/, , . , redis , Batches , , , , .

mongodb - , nosql dbs , , , . Mongo - , , nhibernate .

, , db ( , ). , , , .

0

3 ~ 100 ? . sql , .

, ProductId "".

0

Source: https://habr.com/ru/post/1793146/


All Articles