![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 11 to 15 of 15 total |
![]() |
Tue, Feb 27 2007 7:35 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Tim
Is there a way I can get a list of the table names in the .lck? That way at least I can reuse them. Otherwise at some point I'm going to either have to delete the .lck file or the app is going to crash, or I have to rewrite the app to hold and use a pool of table names. Because the bayesian filter functions are called by threads which pick up wether to access mail or news (mail gets filtered, news doesn't), or the main process I can't simply used fixed file names without making things more complex setting up a pool. Roy Lambert |
Wed, Feb 28 2007 9:01 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Roy,
<< Is there a way I can get a list of the table names in the .lck? >> It's the same as the table names that you're creating. If you want the list, look to your code. ![]() << Because the bayesian filter functions are called by threads which pick up wether to access mail or news (mail gets filtered, news doesn't), or the main process I can't simply used fixed file names without making things more complex setting up a pool. >> I'm not sure what your architecture is, but unless you have more than 4096 threads running at one time, you shouldn't need more than 4096 unique in-memory table names. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Feb 28 2007 10:07 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Tim
>It's the same as the table names that you're creating. If you want the >list, look to your code. ![]() Swine! <vbg> >I'm not sure what your architecture is, but unless you have more than 4096 >threads running at one time, you shouldn't need more than 4096 unique >in-memory table names. The problem is ever since I discovered them I create memory tables for all sorts of things. I generally use an alpha prefix with a gettickcount to make it unique (enough for me anyway). If you take the app where I discovered the problem TMaN my mail and newsreader there are 5 threads to get mail or news, 1 thread to carry out bayesian filtering. Then its an MDI app and you're allowed to open as many post screens as you like each of which uses a few memory tables. I know the pc will self destruct before I get to 4096 in a session but its going to be a lot of work. At least I don't have to worry about the name matching the structure of the table or I'd really be deep in the poopoo. I think I'll use a memory table to keep a list of memory tables ![]() Roy Lambert |
Sat, Mar 3 2007 11:39 AM | Permanent Link |
Roy, two questions. First, a tick is a long time. Are you sure that the
problem isn't that you are getting the same name twice? My suggestion is a routine to allocate the number, using a critical section. You'd remember the last one used, and if the same as the tickcount, you'd increment it and return that. The exact logic is easy but hard to describe. But, what is the purpose of the bayesian filter? I wrote one for my spam filter (from the now closed www.epanoopy.com - you can currently still see the manual though. I initially used DBISAM, but it was very slow for the purpose, and the databases were large. I ended up using a custom table that I could use memory mapped files with, and the assessment is very quick. The main problem with bayesian spam filtering is the table stuffing that the spammers do with all the junk text - it means your database is way bigger than it might be. Anyway, I hope the first thought helps, and I might have time to help on the general issue. /Matthew Jones/ | |
Sun, Mar 4 2007 4:45 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Matthew
Tim did track it down. Creating an index opened the table in non-exclusive mode so it was added to the .lck file. I've altered the app so that names get reused and its fine now. Don't know what you mean about large spam tables - mine only has 195k entries so far ![]() Seriously I have thought about using some other mechanism but whilst DBISAM isn't the fastest for this sort of thing it certainly seems to work well, and I understand it. Roy Lambert |
« Previous Page | Page 2 of 2 | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |