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
asterisk_log indexes (Performance Improvement Suggestions) #47
Comments
Performance is definitely something that could use some improvements. If you'd like to help, please take a look here: |
Index on About long fix. First, do not use NULL records, put default value. So (uistate IS NULL OR uistate != "Closed") can be easy used as Second, my suggestion to move extension extraction to asteriskLogger. Can extract from Channel with simple regexp or even use other field of asterisk packet. I finished to write my own version of asteriskLogger and I can say, that extension number can be found in CallerIDNum or ConnectedLineNum (depend on direction of call). And this request will be very fast. |
@miksir I like your suggestions for indexing and default values. Any chance you could figure out how to put all that into the pre_install.php script so it alters people's database that already have it and will create it properly in the first place for people who don't. While you're at it go ahead and add a new column if need be for the extension storage. The extension extraction is a great idea... Moving the extension is a great idea... that alone will prevent table scans. |
I'll try to look pre_install.php on monday. |
@miksir Any luck? Also, can you email me at blake.robertson [at gmail.com] please include your github name in the body. |
08.08.2012 9:02, Blake Robertson пишет:
|
Sweet. I'd be the happiest guy in the world if you solved the performance bottlenecks! The changes to pre_install look really clean. Haven't tested but will soon. |
On 9 Август 2012 г. 0:54:48, Blake Robertson wrote:
Do you really have performance troubles in your work? I have only 2-3 In rewritten version this requests to asterisk_log isolated to separate
|
No I don't. I only have about 10 and my sugar server is a beast. ~blake On Wed, Aug 8, 2012 at 5:19 PM, miksir notifications@github.com wrote:
|
On 09.08.2012 2:46, Blake Robertson wrote:
|
That shouldn't be too hard. I noticed that the plugin jjw design maps adds a job to the scheduler so could look at his code for that. What were you thinking of doing a part of me doesn't like the idea of deleting anything. Oh and I thought of something that impacts performance. If you have people that open like 6 browser tabs... Each tab is effectively another user since they all independently poll. ~blake On Aug 8, 2012, at 7:01 PM, miksir notifications@github.com wrote:
|
@miksir had emailed me some changes he made to pre_install to add indexes. I'm posting them here so I remember to merge them in to our code. Thanks for your contribution.
|
@miksir I was looking at this code again and was wondering what the reasoning behind changing all the columns from being NULL to NOT NULL by default. |
Sorry for long delay :) Forgot to answer :) |
Ok. That makes sense. Not sure it's worth the effort to go through and make the app not null compatible. From the little investigation, we decided best approach is to just purge asterisk log table of all expired events. This would be done when ever asterisk log ami timeout occurs. That way all queries can be cached completely since there would be no need to query based on time parameters. I've added a user extension column which will be queried in the v3 branch which will further eliminate the need for any regex's in the query. (But haven't yet implemented it) It's slated for the v3 release. There is a branch for this. One thing to note is I don't think the index adding in preinstall is working. ~blake On Nov 15, 2012, at 1:22 PM, miksir notifications@github.com wrote:
|
I've implemented most of these things in the V3 branch. Closing this thread now. Thanks @miksir |
…s much faster AJAX calls to get call info for call popups are much faster. They no longer include timestamps or Like expressions which prevented queries from being cached. Now asteriskLogger periodically purges event from asterisk_log table which are no longer relevant. This is a fairly signifigant change as you can no longer use asterisk log for reporting... but I don't think many users did this anyway. Instead design reports around Calls.
It's strange, but this table almost without indexes. My suggestion (based on fast review of source code):
The text was updated successfully, but these errors were encountered: