# Grok or Dissect?

**URL:** https://discuss.elastic.co/t/grok-or-dissect/198520
**Category:** Logstash
**Created:** [September 7, 2019, 7:09pm UTC](https://discuss.elastic.co/t/grok-or-dissect/198520 "2019-09-07T19:09:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)
#### Post date: [September 7, 2019, 7:09pm UTC](https://discuss.elastic.co/t/grok-or-dissect/198520/1 "2019-09-07T19:09:42Z")

</div>

In my (many, many) filters I use both grok and dissect but I wonder what's recommended? is one faster then the other?

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [September 7, 2019, 7:16pm UTC](https://discuss.elastic.co/t/grok-or-dissect/198520/2 "2019-09-07T19:16:47Z")

</div>

Dissect is faster than grok. It's functionality is much simpler.

---

<div class="post-metadata">

### Author: ![Shaoranlaos](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Shaoranlaos](https://discuss.elastic.co/u/Shaoranlaos)
#### Post date: [September 9, 2019, 5:29am UTC](https://discuss.elastic.co/t/grok-or-dissect/198520/3 "2019-09-09T05:29:37Z")

</div>

Grok is more of an heavy duty gun which can parse all Text for which you can find a Regex (which are a lot), but because of the Regex parsing it is slower then the Disect which simply goes through the text from beginning to end and searches for the defined delimters.

In almost all cases Disect wil be faster. The only Exception i can think of if you search for a string at the end of your input text, for which grok could be faster because you can ancor the search from the end. (No real proof/data as evidence for that only my guess)

---

<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: [October 7, 2019, 5:29am UTC](https://discuss.elastic.co/t/grok-or-dissect/198520/4 "2019-10-07T05:29:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
