summaryrefslogtreecommitdiff
path: root/include/asterisk/astdb.h
AgeCommit message (Collapse)Author
2017-12-10astdb: Improve prefix searches in astdbSean Bright
Using the LIKE operator requires a full table scan of 'astdb', whereas a comparison operation is able to use the primary key index. This patch adds a new function to the AstDB API for quick prefix matches and updates res_sorcery_astdb to utilize it. This showed substantial performance improvement in my test environment. Related to ASTERISK~26806, but does not completely resolve it. Change-Id: I7d37f9ba2aea139dabf2ca72d31fbe34bd9b2fa1
2014-07-24core/db: Revert Patch Added In Attempt To Improve I/O PerformanceMichael L. Young
Reverting the patch since it was causing a regression and after fixing the regression, there were no performance gains. At least based on my method for measurement. ASTERISK-24050 Review: https://reviewboard.asterisk.org/r/3841/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-22core/db: Improve I/O When Updating RowsMichael L. Young
When updating a row, we are currently doing an INSERT OR REPLACE INTO. The downside to this is that the row is deleted if it exists and then a new row is inserted. So, we are hitting the disk twice. One for the deletion and one for the insertion. This patch changes this statement to an INSERT INTO and if the insert fails because a row with that key exists, we will IGNORE the failure. Then we will attempt to perform an UPDATE on the existing row if that row wasn't just INSERTed. ASTERISK-24050 #close Reported by: Michael L. Young patches: astdb-insert-update-io-help_trunk_v2.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/3815/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-27astdb: Tweak some doxygen comments.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-01app_queue: Support persisting and loading of long member lists.Sean Bright
Greenlight in #asterisk brought up that he was receiving an error message "Could not create persistent member string, out of space" when running app_queue in Asterisk 10. dump_queue_members() made an assumption that 8K would be enough to store the generated string, but with queues that have large member lists this is not always the case. This patch removes the limitation and uses ast_str instead of a fixed sized buffer. The complicating factor comes from the fact that ast_db_get requires a buffer and buffer size argument, which doesn't let us pull back more than what we pass in, so I introduced a new ast_db_get_allocated() which returns an ast_strdup()'d copy of the value from astdb. As an aside, I did some testing on the maximum size of data that we can store in the BDB library we distribute and was able to store a 10MB string and retrieve it with no problems, so I feel this is a safe patch. Review: https://reviewboard.asterisk.org/r/2136/ ........ Merged revisions 374108 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374135 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374150 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-09Merged revisions 322865 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r322865 | twilson | 2011-06-09 15:29:20 -0700 (Thu, 09 Jun 2011) | 4 lines Correct ast_db_deltree documentation ast_db_deltree returns -1 on error, otherwise the number of deletions ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19Merged revisions 302680 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r302680 | tilghman | 2011-01-19 15:23:31 -0600 (Wed, 19 Jan 2011) | 16 lines Merged revisions 302675 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r302675 | tilghman | 2011-01-19 15:22:45 -0600 (Wed, 19 Jan 2011) | 9 lines Merged revisions 302663 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r302663 | tilghman | 2011-01-19 15:20:28 -0600 (Wed, 19 Jan 2011) | 2 lines Add some API documentation ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11A lot of doxygen updatesOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05const-ify some more APIs, and fix rev 49710 from branch-1.4 in a better way hereKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29remove extraneous svn:executable propertiesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-24Doxygen documentation update from oej (issue #5505)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-30major header file cleanup: license, copyrights, descriptions, markers, etc.Kevin P. Fleming
remove deprecated config_old.c/config_old.h remove unused cvsid.h git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-04-13Add ast_db_freetree and ast_db_gettreeMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2002-12-27Version 0.3.0 from FTPMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@573 65c4cc65-6c06-0410-ace0-fbb531ad65f3