You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by pieter gmail <pi...@gmail.com> on 2017/10/26 18:18:34 UTC

remove step

Hi,

I was wondering if we can add a remove step. Currently to remove 
elements I iterate the traversal and call remove on each element. Adding 
a remove step will make it possible to optimize removals.

Its probably less useful for Neo4j and TinkerGraph, not sure about Janus 
but for Sqlg,

g.V().hasLabel("X").rm() will translate to one sql truncate statement. 
Currently to do a remove it loads all 'X's and deletes them one by one. 
Bit of optimizing with a bulk deletion vibe but it could be way better 
if there was a step to optimize.

Thanks
Pieter

Re: remove step

Posted by pieter gmail <pi...@gmail.com>.
Ha, there it is already. Sorry did not know about that one. A rtfm moment.

Thanks
Pieter

On 26/10/2017 20:21, Stephen Mallette wrote:
> Is there some difference between what you are proposing and:
>
> http://tinkerpop.apache.org/docs/current/reference/#drop-step
>
> On Thu, Oct 26, 2017 at 2:18 PM, pieter gmail <pi...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I was wondering if we can add a remove step. Currently to remove elements
>> I iterate the traversal and call remove on each element. Adding a remove
>> step will make it possible to optimize removals.
>>
>> Its probably less useful for Neo4j and TinkerGraph, not sure about Janus
>> but for Sqlg,
>>
>> g.V().hasLabel("X").rm() will translate to one sql truncate statement.
>> Currently to do a remove it loads all 'X's and deletes them one by one. Bit
>> of optimizing with a bulk deletion vibe but it could be way better if there
>> was a step to optimize.
>>
>> Thanks
>> Pieter
>>


Re: remove step

Posted by Stephen Mallette <sp...@gmail.com>.
Is there some difference between what you are proposing and:

http://tinkerpop.apache.org/docs/current/reference/#drop-step

On Thu, Oct 26, 2017 at 2:18 PM, pieter gmail <pi...@gmail.com>
wrote:

> Hi,
>
> I was wondering if we can add a remove step. Currently to remove elements
> I iterate the traversal and call remove on each element. Adding a remove
> step will make it possible to optimize removals.
>
> Its probably less useful for Neo4j and TinkerGraph, not sure about Janus
> but for Sqlg,
>
> g.V().hasLabel("X").rm() will translate to one sql truncate statement.
> Currently to do a remove it loads all 'X's and deletes them one by one. Bit
> of optimizing with a bulk deletion vibe but it could be way better if there
> was a step to optimize.
>
> Thanks
> Pieter
>