Giter VIP home page Giter VIP logo

Comments (3)

ostafen avatar ostafen commented on September 25, 2024

Hey, @willie68, the quickest option I see is to delete documents in batches inside DropCollection().
However, such an approach would make clover a bit tight to a specific storage engine, in this case badgerdb, so I'm not sure about the benefit of implementing it, as in general different storage engine may have very different characteristics and limitations.
Since you can achieve the sam, by just calling clover Delete() methods and selecting documents in batches (using offset and limit), I would suggest you to do so.
Does this help you?

from clover.

willie68 avatar willie68 commented on September 25, 2024

Thank you for the fast feedback.

First I tried bbolt. But I already failed at Query. Just a simple search with
results, err := db.FindAll(q.NewQuery(dbTable).Where(q.Field("datatime").Lt(queryTime)))
failed. (There was an index on datatime) In addition, the import performance was not sufficient for 1,000,000 data records. That's why I try to use BadgerDB. (I have already used it successfully in other projects)
#DropCollection Of course I could do this manually. Since I only have one collection at the moment, it's easier for unit tests to simply delete the file system. In the main application DropCollection will never be executed.
However, I think it is important that functions offered, should work with all options.
Maybe you can possibly extend the store interface, and put the special implementation into the store/badger/badger.go

PS.: Just found the problem of time queries in bbolt. But the performance issue remains.
100.000 simple records inserts
bbolt: 4m22.2910021s
badger: 2.9658109s

from clover.

liaogang avatar liaogang commented on September 25, 2024

我曾经用BadgerDB,bblotdb,pepperDB,leveldb处理过500万量级的数据,除了leveldb,其它都有各种各样的问题

from clover.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.