Comments (7)
Hi.
Repack your data into an empty table to get initial size (select from one table and insert into another, use byte[] level for copying) - it will be your "vacuum" and will restore the table size.
Then try to disable "Technical_SetTable_OverwriteIsNotAllowed" (just don't call it) and sort your batch ascending by key in memory before insert (you can look integrated sorter - tran.RandomKeySorter - read docu).
If the speed of the batch insert is not satisfactory, then try to use "Technical_SetTable_OverwriteIsNotAllowed" after batch is sorted in memory.
If size will be again too big, then algorithm must be rethinked.
from dbreeze.
Hi,
thanks for quick response!
A couple of notes:
- Technical_SetTable_OverwriteIsNotAllowed we do not use from the beginning (actually I've read about it today when digging doc, so this option was always in its default state).
- Keys are always in ascending order. Actually, we use DBreeze as complimentary DB engine to SQL Server, so our keys are values from ID column from corresponding SQL Table and have identity / auto-increment field type (1,1) (so grow always ascending).
Can you slightly explain (or point to the source code or doc) how engine decide when to overwrite or remove/insert instead and how removing implemented if there are other records following deleted row exists (update in the middle)?
from dbreeze.
Am I understand correctly that there are no any additional actions for removing in middle (due to performance reasons), so if we need such behavior we have to implement manually, i.e. read tail, remove it and store update with unmodified parts? Similar to the logic of RandomKeySorter as you pointed.
from dbreeze.
May be you can try to write a small program emulating your behavior of the insert/insert/update logic, pointing the performance or size problem. For me is very difficult to talk without such examples.
If you want we can go on discussion on our native language.
from dbreeze.
Thank you for the answer!
I dig source code a bit and can say that I'm probably right in my assumptions. I think we can close for now. We rethink our save logic and if the issue arises again then we can reopen it.
from dbreeze.
Remove in DBreeze is only a "logical" operation, data stays physically inside the file, only search keys are rewritten.
from dbreeze.
Thanks for clarification.
from dbreeze.
Related Issues (20)
- Getting "Getting table "@utCoins" from the schema failed!" when calling Technical_SetTable_OverwriteIsNotAllowed HOT 2
- DBreeze sorts by ID HOT 4
- DBreeze.Exceptions.DBreezeException: Creation of the database folder failed! ---> DBreeze.Exceptions.DBreezeException: Database is not operable, please find out the problem and restart the engine! FSR INIT FAILED HOT 5
- What's wrong with transactions? HOT 4
- Multiple DBreezeEngine instances to the same db files HOT 1
- Custom Serializator for Biser? HOT 4
- Biser Objectifies classes using different namespace than DBreeze's version HOT 6
- Text Search of items < minimum size not possible? HOT 4
- Count of documents ids 0 with data being in the table HOT 3
- .net core 5 HOT 4
- Serialize/Deserialize should not be static
- Reading from multiple tables at once and returning sorted results HOT 2
- TextSearch Tables still contains internal/external references, after using TextRemoveAll HOT 5
- RemoveSession is not called on "DBreeze.Exceptions.DBreezeException: One transaction can be used from one thread only!" HOT 1
- What happens to Old DataBlocks? HOT 7
- Memory mode insert slower than writes on disk HOT 1
- Database insert speed HOT 4
- Vector Simillarity search unexpected results HOT 3
- Unity HOT 10
- vector database search slow HOT 48
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbreeze.