Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class Xhgui_Profiles method "paginate" return so large data #93

Open
ideamean opened this issue Jan 26, 2014 · 1 comment
Open

class Xhgui_Profiles method "paginate" return so large data #93

ideamean opened this issue Jan 26, 2014 · 1 comment
Labels
Milestone

Comments

@ideamean
Copy link

Now I saw my mongo db in results collection have more than 400W record.
when the paginate find record for the url list, it return so large data and cost more times.

the url: /url/view?url=* is always give the error:
qq20140126181913

1: the most fields in the document is not to need. I give a parameter to the find method made it return the need fields then the find speed is better.
qq20140126181318
2: the other resaon
the method "getPercentileForUrl", it use "aggregate", it also take so many times.
but now I don't konw how to Optimize it, I think should write a crontab script excute everty day, call this function and then save the result in another collection, then find the result from the new collection, it will passed the aggregate's Calculate time, there just select time.
or use ajax call getPercentileForUrl to graph.
any other idea?

@markstory
Copy link
Member

I don't think an ajax request will make mongo perform better. I think changing the projection parameters is a great idea.

Adding a cron job is an option, but it complicates the installation and usage of xhgui. I think your best option at this point your best option might be to reduce the size of your data set. Mongo's aggregation tools don't perform well and sometimes not at all if you have a large dataset.

@markstory markstory modified the milestone: v0.5.0 Jan 14, 2015
@markstory markstory modified the milestones: v0.5.0, 0.6.0 Oct 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants