diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-10-18 21:45:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:21:26 -0500 |
commit | 4b9eee02c4a0c856f16d9f17929e726fb75e051f (patch) | |
tree | c22d0f46f4d6d549feb4873d3274cc837aab08fe /source4/lib/ldb/ldb_tdb/ldb_tdb.h | |
parent | cba142f1ae71b03266210e254c251683846d7fd7 (diff) | |
download | samba-4b9eee02c4a0c856f16d9f17929e726fb75e051f.tar.gz samba-4b9eee02c4a0c856f16d9f17929e726fb75e051f.tar.bz2 samba-4b9eee02c4a0c856f16d9f17929e726fb75e051f.zip |
r19402: - use the new tdb_lockall_read() to make ldb_search() more efficient,
by avoiding chain locks on each tdb_fetch() within the search
- use the tdb_get_seqnum() call to avoid re-reading the @BASEINFO
record when it hasn't changed.
These speed up the LOCAL-DBSPEED test for ldb from 7k ops/sec to a bit
over 11k ops/sec
(This used to be commit 1347ad254eb8cd12ce22a5a2a37bec0a0ac8dbf1)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_tdb.h')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_tdb.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.h b/source4/lib/ldb/ldb_tdb/ldb_tdb.h index c20c3bd5f9..42f3dc2421 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.h +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.h @@ -21,6 +21,10 @@ struct ltdb_private { handling. It has plenty of digits of precision */ unsigned long long sequence_number; + /* the low level tdb seqnum - used to avoid loading BASEINFO when + possible */ + int tdb_seqnum; + struct ltdb_cache { struct ldb_message *indexlist; struct ldb_message *attributes; |