# Design help

**URL:** https://discuss.elastic.co/t/design-help/15339
**Category:** Elasticsearch
**Created:** [January 21, 2014, 10:53am UTC](https://discuss.elastic.co/t/design-help/15339 "2014-01-21T10:53:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![samuel\_merlet1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samuel_merlet1/32/1242_2.png) [@samuel\_merlet1](https://discuss.elastic.co/u/samuel_merlet1)
#### Post date: [January 21, 2014, 10:53am UTC](https://discuss.elastic.co/t/design-help/15339/1 "2014-01-21T10:53:56Z")

</div>

Hello,

I have a question related to data/application design .

I want to use elasticsearch to get some statistics , we currently use MySQL  
but we have serious performance issues , i really think ES can help us.

I have a table that record some event of operators login and logout . It  
looks like this

## ID I operator I event I datetime

12 I 4587 I login I 2014-01-20 10:15:10  
12 I 4581 I login I 2014-01-20 12:15:10  
12 I 4587 I logout I 2014-01-20 13:15:10

from this i need to provide some stats like for exemple :  
for a given day/week/month how much time do have a least 1 operator online  
for a given day/week/month how much operator are online at the same time

then i need for exemple a granularity hour per hour

i currently fetch some data from mysql and compute my stats using php , but  
we talk here about millions of entries i and i expect to get much more in  
few months , so i need something fast .

So my questions are , does ES can be usefull if i store my data as it ,  
does ES provide the necessary tools to make some stats without having to  
compute after fetching the datas .  
Do i have to compute some data before storing in ES ( for exemple calculate  
for each hour of the day and store each hour as a document )

i would love to hear from you if you already have such a case , or if you  
have some ideas .

( if it's not the good place for such a discussion where can i post it ? )

Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e01aa314-3d1f-4286-9283-0b3f22b7b171%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e01aa314-3d1f-4286-9283-0b3f22b7b171%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:55am UTC](https://discuss.elastic.co/t/design-help/15339/2 "2017-07-06T01:55:38Z")

</div>


