Forms, print queues and tdb
Simo Sorce
simo.sorce at polimi.it
Thu Jan 11 00:08:42 GMT 2001
On Wed, 10 Jan 2001, Damian Ivereigh wrote:
> I am noticing that there are several times where Samba is doing a
> serial search through all the keys in a tdb file. The main reason
> seems to be that because tdb uses hashes, you can only go to a certain
> key, you can't do a subkey match.
>
> For example the print jobs are stored in the printing.tdb file.
> However the print queue name is not part of key, but even if it was
> you could not say "give me all the records that match the partial key
> that corresponds to this printer". So the Samba ends up doing a
> tdb_traverse picking up every single job and seeing if it matches this
> printer.
>
> A similar thing happens around forms - since there is no way to match
> keys that begin with "FORM/", you end up having to do a traverse
> through the entire file, very slow when there are a lot of forms and a
> lot of drivers to wade through.
>
> The only solution I can see is to either have a seperate tdb file for
> each print queue (and a seperate one for the forms), or to use some
> method of indexing that gives a sorted order and therefore allows
> partial matches - e.g. one of the b-tree algorithms. So how attached
> is everyone to tdb? Can anyone think of a better solution? Is my brain
> deranged?
>
> Damian
>
You are perfectly sane and this problem is also suffered by the tdb passwd
backend, a solution is really welcome, just there so many things to do....
--
Simo Sorce - Integrazione Sistemi Unix/Windows - Politecnico di Milano
E-mail: simo.sorce at polimi.it
Tel.int: 02 2399 2425 - Fax.int. 02 2399 2451
-----------------------------------------------------------------
Be happy, use Linux!
More information about the samba-technical
mailing list