Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 11 to 19 of 19 total |
Global FlushBuffers() - how do I do that? |
Sat, Mar 22 2008 6:42 PM | Permanent Link |
"Robert" | "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:89E1CE2F-8FB5-4280-B8E1-F2CE9FAF9F52@news.elevatesoft.com... > Robert, > > << Tim, what would happen if you do a database.starttransaction followed > immediately by a database.commit(true)? >> > > Unfortunately, it's smart enough to know not to tell the OS to flush if > nothing was written. > > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
Sat, Mar 22 2008 6:43 PM | Permanent Link |
"Robert" | "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:89E1CE2F-8FB5-4280-B8E1-F2CE9FAF9F52@news.elevatesoft.com... > Robert, > > << Tim, what would happen if you do a database.starttransaction followed > immediately by a database.commit(true)? >> > > Unfortunately, it's smart enough to know not to tell the OS to flush if > nothing was written. > What's the call? Maybe he can just do it himself. Robert > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
Sat, Mar 22 2008 8:37 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Robert,
<< What's the call? Maybe he can just do it himself. >> You have to make the call on each open table's files, which puts him back to square one again. If he could just do it at the time of the TDBISAMQuery usage, he wouldn't have any issue. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Mar 24 2008 1:53 PM | Permanent Link |
timjones | >>Yes, but doesn't all of this stem back to the issue with Vista again ? I
>>find it a bit of a stretch that you're implying that DBISAM is somehow >>making your life difficult. If it's Vista, then MS is making your life >>difficult, not us. You are right - its a Vista's issue, but there is not way I can get a fix for Vista, though there is a slight chance to persuade you to improve DBISAM |
Mon, Mar 24 2008 1:55 PM | Permanent Link |
timjones | That looks interesting, though I am not sure how can I easily validate that this would
work 100% of the time... Maybe if I instrument DBISAM sources with logging... -------------- Sean McCall <someone@somewhere.net> wrote: Looking at the source code it looks like it might work to toggle ForceFlushBuffers right before the last query. So, if you want to force fluah every 300 times: var AFlushCount: Integer; AFlushInterval: Integer; ResetFlushBuffers(300); {every 300) for I := 1 to 1000 do begin CheckFlushBuffers(I = 1000); {make sure last flushes} DoYourQuery; end; {for I} procedure CheckFlushBuffers(AForce: Boolean); begin Dec(AFlushCount); if AFlushCount <= 0 then begin Session.ForceBufferFlush := True; AFlushCount := AFlushInterval; end else if Session.ForceBufferFlush then begin Session.ForceBufferFlush := False; end; end; procedure ResetFlushBuffers(AInterval: Integer); begin AFlushCount := AInterval; AFlushInterval := AInterval; end; Hope this is what you needed, Sean Roy Lambert wrote: > timjones > > >> Rewriting a chunk of large 3rd party application framework is not very good ROI for our >> time. > > It is if it prevents errors and stops customers complaining > >> We use tools like DBISAM and application frameworks so our life gets easier and not >> more complex > > Without seeing your code obviously I can't comment on how much more complex it would get but I am surprised. My thoughts were based on the fact that you are creating the query. This means that you must be assigning the sql code to its sql property. so rather than > > - Create DBISAMQuery > - Execute SQL > - Destroy DBISAMQuery > - repeat 1000 times... > > You'd have > > create stringlist > add sql to stringlist > repeat 1000 times > assign sql to query > execute query > flushbuffers > destroy query > destroy stringlist > > > Roy Lambert |
Mon, Mar 24 2008 2:31 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | << You are right - its a Vista's issue, but there is not way I can get a fix for Vista, though there is a slight chance to persuade you to improve DBISAM >> Yes, but unfortunately we're at the mercy of Vista and MS here. If there was a way around it, I would do it. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Apr 3 2008 12:12 PM | Permanent Link |
Sam Jones | >>>>>>>>>>>>>>>>>>>
<< I need a function that can flush buffers without having reference to the DBISAMQuery or DBISAMTable. How can I implement global ForceBuffers() function that would flush all "unflushed" buffers to disk? >> There isn't one at this time. It's something that I can put on the enhancements list for the next minor release, however. <<<<<<<<<<<<<<<<<<<< bump on the above |
Thu, Apr 3 2008 3:05 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Rafael,
<< bump on the above >> You really don't need to keep bringing this to my attention. I've got it on the list of DBISAM enhancements to address in the next DBISAM minor release, so it will get taken care of. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Apr 3 2008 4:40 PM | Permanent Link |
Sam Jones | Thanks!
We will be on the lookout! |
« Previous Page | Page 2 of 2 | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |