# Slow type delete

**URL:** <https://discuss.elastic.co/t/slow-type-delete/8136>\
**Category:** Elasticsearch\
**Created:** [June 18, 2012, 3:57am UTC](https://discuss.elastic.co/t/slow-type-delete/8136 "2012-06-18T03:57:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![WhatElse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatelse/32/2722_2.png) [@WhatElse](https://discuss.elastic.co/u/WhatElse)\
**Post date:** [June 18, 2012, 3:57am UTC](https://discuss.elastic.co/t/slow-type-delete/8136/1 "2012-06-18T03:57:43Z")

</div>

Hi,

I have setted my index and add a mapping to one of his type and when i'm  
trying to delete it, it's very very slow, like ten seconds to do that.

The curl request is very simple : curl -XDELETE  
[http://localhost:9200/french/user/](http://localhost:9200/french/user/)

What's wrong ?

Thank you in advance ! (and sorry for my english ☹ )

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 18, 2012, 5:02am UTC](https://discuss.elastic.co/t/slow-type-delete/8136/2 "2012-06-18T05:02:54Z")

</div>

How many docs for this type in your index ?

BTW, dropping an index is really fast as it only deletes a dir.

David 😉  
Twitter : @dadoonet / @elasticsearchfr

Le 18 juin 2012 à 05:57, WhatElse [kevin.perard@gmail.com](mailto:kevin.perard@gmail.com) a écrit :

> Hi,
> 
> I have setted my index and add a mapping to one of his type and when i'm trying to delete it, it's very very slow, like ten seconds to do that.
> 
> The curl request is very simple : curl -XDELETE [http://localhost:9200/french/user/](http://localhost:9200/french/user/)
> 
> What's wrong ?
> 
> Thank you in advance ! (and sorry for my english ☹ )

---

<div class="post-metadata">

**Author:** ![WhatElse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatelse/32/2722_2.png) [@WhatElse](https://discuss.elastic.co/u/WhatElse)\
**Post date:** [June 18, 2012, 6:25pm UTC](https://discuss.elastic.co/t/slow-type-delete/8136/3 "2012-06-18T18:25:24Z")

</div>

I have no docs, I just put setting and mapping of my index/type and I  
wanted to delete this but that took so long time. If I delete on index or  
node, it's instant... I will try to make a git to reproduce this...

Le lundi 18 juin 2012 01:02:54 UTC-4, David Pilato a écrit :

> How many docs for this type in your index ?
> 
> BTW, dropping an index is really fast as it only deletes a dir.
> 
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr
> 
> Le 18 juin 2012 à 05:57, WhatElse [kevin.perard@gmail.com](mailto:kevin.perard@gmail.com) a écrit :
> 
> > Hi,
> > 
> > I have setted my index and add a mapping to one of his type and when i'm  
> > trying to delete it, it's very very slow, like ten seconds to do that.
> > 
> > The curl request is very simple : curl -XDELETE  
> > [http://localhost:9200/french/user/](http://localhost:9200/french/user/)
> > 
> > What's wrong ?
> > 
> > Thank you in advance ! (and sorry for my english ☹ )

---

<div class="post-metadata">

**Author:** ![WhatElse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatelse/32/2722_2.png) [@WhatElse](https://discuss.elastic.co/u/WhatElse)\
**Post date:** [June 19, 2012, 1:25am UTC](https://discuss.elastic.co/t/slow-type-delete/8136/4 "2012-06-19T01:25:58Z")

</div>

I have made a git repository where i put the settings and mappings file  
with the script. The delete request is very long, please can you check it  
and give me your feedback about this. Thank you.

This is the github link :  
[https://github.com/Nelrohd/WhatElse/tree/master/index](https://github.com/Nelrohd/WhatElse/tree/master/index)

On Monday, June 18, 2012 2:25:24 PM UTC-4, WhatElse wrote:

> I have no docs, I just put setting and mapping of my index/type and I  
> wanted to delete this but that took so long time. If I delete on index or  
> node, it's instant... I will try to make a git to reproduce this...
> 
> Le lundi 18 juin 2012 01:02:54 UTC-4, David Pilato a écrit :
> 
> > How many docs for this type in your index ?
> > 
> > BTW, dropping an index is really fast as it only deletes a dir.
> > 
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr
> > 
> > Le 18 juin 2012 à 05:57, WhatElse [kevin.perard@gmail.com](mailto:kevin.perard@gmail.com) a écrit :
> > 
> > > Hi,
> > > 
> > > I have setted my index and add a mapping to one of his type and when  
> > > i'm trying to delete it, it's very very slow, like ten seconds to do that.
> > > 
> > > The curl request is very simple : curl -XDELETE  
> > > [http://localhost:9200/french/user/](http://localhost:9200/french/user/)
> > > 
> > > What's wrong ?
> > > 
> > > Thank you in advance ! (and sorry for my english ☹ )

---

<div class="post-metadata">

**Author:** ![WhatElse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatelse/32/2722_2.png) [@WhatElse](https://discuss.elastic.co/u/WhatElse)\
**Post date:** [June 19, 2012, 5:13am UTC](https://discuss.elastic.co/t/slow-type-delete/8136/5 "2012-06-19T05:13:20Z")

</div>

Even the index is slow... what is wrong in this mapping ?

$mappings = array(  
"user" =\> array(  
"\_all" =\> array("analyzer" =\> "french"),  
"properties" =\> array(  
"email" =\> array(  
"type" =\> "multi\_field",  
"fields" =\> array(  
"email" =\> array("type" =\> "string", "index" =\> "analyzed", "analyzer" =\>  
"email"),  
"untouched" =\> array("type" =\> "string", "index" =\> "not\_analyzed")  
)  
),  
"password" =\> array(  
"type" =\> "string",  
"index" =\> "not\_analyzed"  
),  
"last\_name" =\> array(  
"type" =\> "multi\_field",  
"fields" =\> array(  
"last\_name" =\> array("type" =\> "string", "index" =\> "analyzed", "analyzer"  
=\> "french"),  
"untouched" =\> array("type" =\> "string", "index" =\> "not\_analyzed")  
)  
),  
"first\_name" =\> array(  
"type" =\> "multi\_field",  
"fields" =\> array(  
"first\_name" =\> array("type" =\> "string", "index" =\> "analyzed", "analyzer"  
=\> "french"),  
"untouched" =\> array("type" =\> "string", "index" =\> "not\_analyzed")  
)  
),  
"birthday" =\> array(  
"type" =\> "date",  
"format" =\> "date"  
),  
"date\_creation" =\> array(  
"type" =\> "date",  
"format" =\> "yyyy-MM-dd HH:mm:ss"  
),  
"date\_activation" =\> array(  
"type" =\> "date",  
"format" =\> "yyyy-MM-dd HH:mm:ss",  
"default\_value" =\> "0000-00-00 00:00:00"  
),  
"key\_activation" =\> array(  
"type" =\> "string",  
"index" =\> "not\_analyzed",  
"default\_value" =\> ""  
),  
"key\_password" =\> array(  
"type" =\> "string",  
"index" =\> "not\_analyzed",  
"default\_value" =\> ""  
),  
"activate" =\> array(  
"type" =\> "boolean",  
"null\_value" =\> 1  
),  
"type\_permission" =\> array(  
"type" =\> "multi\_field",  
"fields" =\> array(  
"type\_permission" =\> array("type" =\> "string", "index" =\> "analyzed",  
"analyzer" =\> "french"),  
"untouched" =\> array("type" =\> "string", "index" =\> "not\_analyzed")  
)  
),  
"permissions" =\> array(  
"type" =\> "string",  
"index" =\> "not\_analyzed",  
"null\_value" =\> "user"  
),  
)  
)  
);

On Monday, June 18, 2012 9:25:58 PM UTC-4, WhatElse wrote:

> I have made a git repository where i put the settings and mappings file  
> with the script. The delete request is very long, please can you check it  
> and give me your feedback about this. Thank you.
> 
> This is the github link :  
> [https://github.com/Nelrohd/WhatElse/tree/master/index](https://github.com/Nelrohd/WhatElse/tree/master/index)
> 
> On Monday, June 18, 2012 2:25:24 PM UTC-4, WhatElse wrote:
> 
> > I have no docs, I just put setting and mapping of my index/type and I  
> > wanted to delete this but that took so long time. If I delete on index or  
> > node, it's instant... I will try to make a git to reproduce this...
> > 
> > Le lundi 18 juin 2012 01:02:54 UTC-4, David Pilato a écrit :
> > 
> > > How many docs for this type in your index ?
> > > 
> > > BTW, dropping an index is really fast as it only deletes a dir.
> > > 
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr
> > > 
> > > Le 18 juin 2012 à 05:57, WhatElse [kevin.perard@gmail.com](mailto:kevin.perard@gmail.com) a écrit :
> > > 
> > > > Hi,
> > > > 
> > > > I have setted my index and add a mapping to one of his type and when  
> > > > i'm trying to delete it, it's very very slow, like ten seconds to do that.
> > > > 
> > > > The curl request is very simple : curl -XDELETE  
> > > > [http://localhost:9200/french/user/](http://localhost:9200/french/user/)
> > > > 
> > > > What's wrong ?
> > > > 
> > > > Thank you in advance ! (and sorry for my english ☹ )

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 19, 2012, 5:26am UTC](https://discuss.elastic.co/t/slow-type-delete/8136/6 "2012-06-19T05:26:16Z")

</div>

Do you see something in logs ? Look at the slowlog file.

Le 19 juin 2012 à 07:13, WhatElse [kevin.perard@gmail.com](mailto:kevin.perard@gmail.com) a écrit :

> Even the index is slow... what is wrong in this mapping ?
> 
> $mappings = array(  
> "user" =\> array(  
> "\_all" =\> array("analyzer" =\> "french"),  
> "properties" =\> array(  
> "email" =\> array(  
> "type" =\> "multi\_field",  
> "fields" =\> array(  
> "email" =\> array("type" =\> "string", "index" =\> "analyzed", "analyzer" =\> "email"),  
> "untouched" =\> array("type" =\> "string", "index" =\> "not\_analyzed")  
> )  
> ),  
> "password" =\> array(  
> "type" =\> "string",  
> "index" =\> "not\_analyzed"  
> ),  
> "last\_name" =\> array(  
> "type" =\> "multi\_field",  
> "fields" =\> array(  
> "last\_name" =\> array("type" =\> "string", "index" =\> "analyzed", "analyzer" =\> "french"),  
> "untouched" =\> array("type" =\> "string", "index" =\> "not\_analyzed")  
> )  
> ),  
> "first\_name" =\> array(  
> "type" =\> "multi\_field",  
> "fields" =\> array(  
> "first\_name" =\> array("type" =\> "string", "index" =\> "analyzed", "analyzer" =\> "french"),  
> "untouched" =\> array("type" =\> "string", "index" =\> "not\_analyzed")  
> )  
> ),  
> "birthday" =\> array(  
> "type" =\> "date",  
> "format" =\> "date"  
> ),  
> "date\_creation" =\> array(  
> "type" =\> "date",  
> "format" =\> "yyyy-MM-dd HH:mm:ss"  
> ),  
> "date\_activation" =\> array(  
> "type" =\> "date",  
> "format" =\> "yyyy-MM-dd HH:mm:ss",  
> "default\_value" =\> "0000-00-00 00:00:00"  
> ),  
> "key\_activation" =\> array(  
> "type" =\> "string",  
> "index" =\> "not\_analyzed",  
> "default\_value" =\> ""  
> ),  
> "key\_password" =\> array(  
> "type" =\> "string",  
> "index" =\> "not\_analyzed",  
> "default\_value" =\> ""  
> ),  
> "activate" =\> array(  
> "type" =\> "boolean",  
> "null\_value" =\> 1  
> ),  
> "type\_permission" =\> array(  
> "type" =\> "multi\_field",  
> "fields" =\> array(  
> "type\_permission" =\> array("type" =\> "string", "index" =\> "analyzed", "analyzer" =\> "french"),  
> "untouched" =\> array("type" =\> "string", "index" =\> "not\_analyzed")  
> )  
> ),  
> "permissions" =\> array(  
> "type" =\> "string",  
> "index" =\> "not\_analyzed",  
> "null\_value" =\> "user"  
> ),  
> )  
> )  
> );
> 
> On Monday, June 18, 2012 9:25:58 PM UTC-4, WhatElse wrote:  
> I have made a git repository where i put the settings and mappings file with the script. The delete request is very long, please can you check it and give me your feedback about this. Thank you.
> 
> This is the github link : [https://github.com/Nelrohd/WhatElse/tree/master/index](https://github.com/Nelrohd/WhatElse/tree/master/index)
> 
> On Monday, June 18, 2012 2:25:24 PM UTC-4, WhatElse wrote:  
> I have no docs, I just put setting and mapping of my index/type and I wanted to delete this but that took so long time. If I delete on index or node, it's instant... I will try to make a git to reproduce this...
> 
> Le lundi 18 juin 2012 01:02:54 UTC-4, David Pilato a écrit :  
> How many docs for this type in your index ?
> 
> BTW, dropping an index is really fast as it only deletes a dir.
> 
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr
> 
> Le 18 juin 2012 à 05:57, WhatElse [kevin.perard@gmail.com](mailto:kevin.perard@gmail.com) a écrit :
> 
> > Hi,
> > 
> > I have setted my index and add a mapping to one of his type and when i'm trying to delete it, it's very very slow, like ten seconds to do that.
> > 
> > The curl request is very simple : curl -XDELETE [http://localhost:9200/french/user/](http://localhost:9200/french/user/)
> > 
> > What's wrong ?
> > 
> > Thank you in advance ! (and sorry for my english ☹ )

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:23am UTC](https://discuss.elastic.co/t/slow-type-delete/8136/7 "2017-07-06T03:23:30Z")

</div>


