Skip to content

Investigate batched delete performance #1762

Closed

Description

@coffeemug
r.table('foo').filter(lambda x: x['age']>1).delete()
r.table('foo').delete()

Queries of this type seem to subjectively run very slowly.

Activity

  1. jdoliner commented on Dec 12, 2013

    @jdoliner
    Contributor

    We basically know why this is already. That query requires transferring every document you want to delete to the node that received the query.

    I was pretty sure we already had an issue for this but I can't find it.

  2. mlucy commented on Dec 12, 2013

    @mlucy
    Member

    Fixing this correctly would mean implementing ranged writes. We could make it a lot better, though, by only sending the ID from the shards to the server handling the query rather than sending the whole row.

  3. AtnNn commented on Dec 13, 2013

    @AtnNn
    Member

    Related to #134

  4. modified the milestones: subsequent, backlog on Mar 26, 2014
  5. coffeemug commented on Oct 16, 2014

    @coffeemug
    ContributorAuthor

    @danielmewes -- could we try to prioritize this?

  6. modified the milestones: , subsequent on Oct 16, 2014
  7. danielmewes commented on Oct 21, 2014

    @danielmewes
    Member

    Another thing we should change is how query profiles are generated when deleting documents. I was bitten by the fact that I had query profiling turned on in the Data Explorer when running a big delete. Apparently we generate one (relatively complex) entry in the query profile for every single deleted document.
    I imagine that will go away automatically when we restructure batched deletes...

  8. mlucy commented on Oct 21, 2014

    @mlucy
    Member

    @danielmewes: the profiler shouldn't be producing one entry per deleted document (we're probably just missing a sampler there). I opened a separate issue for that.

  9. modified the milestones: , subsequent on Jan 2, 2015
  10. danielmewes commented on Feb 19, 2015

    @danielmewes
    Member

    @mlucy has implemented the improvement where we only send the primary key and not the whole document to the parser. That should make these queries more efficient.

  11. wojons commented on Apr 20, 2015

    @wojons
    Contributor

    Wanted to let you know that in 2.0 i have a large delete 5 nodes all spinning disk shared table across allow nodes just doing a delete all rows from the database and capping out 100 records a seocnd and the cluster is idle outside of that also it has 4 or 5 indexes.

  12. wojons commented on Apr 20, 2015

    @wojons
    Contributor

    something that i am also noticing is i can get between 700-1.5k updates per second on the same cluster same config. Same documents. And from what i remember an update rewrites the whole document so finding it weird it takes more time to delete then to update.

  13. thelinuxlich commented on Mar 12, 2018

    @thelinuxlich

    @srh maybe close this in favor of #134 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions