Subject AW: [IBO] Re: a way to store "last accessed date"
Author Kaputnik
The could be a very simple solution:
Store your images in a separate table. Use a normal query to access the
rows, but use a stored procedure to access the blobs. Log the reading of the
blob either in the same table as the blob with a simple update before the
read itself. Now simply search the blob-table for all rows where the
last-read entry doesn't fit in a selected time-frame and there you go. The
Stored Proc will also very easily Raise an event or give back an error-code
if the blob was archived. This is a server-side solution and should work
faster than a client-side-solution, especially, as the queryies for update
and select are preoptimized there.

Hope this helps and CU,

Nick Josipovic
CRM Administration
BIT-Institute
Prof. Dr. Franz Steffens
Schloss
68163 Mannheim
Germany
Phone: ++49 621 181-1621
Fax: ++49 621 181-1618
mailto:nick.josipovic@...



> -----Ursprungliche Nachricht-----
> Von: spou@... [mailto:spou@...]
> Gesendet: Donnerstag, 13. September 2001 02:44
> An: IBObjects@yahoogroups.com
> Betreff: [IBO] Re: a way to store "last accessed date"
>
>
> it feels ackward to reply to one own messages :-)
>
> judging from the anwsers I got, I feel that I did not made myself
> clear enough, and I am sorry for the inconvenience.
>
> Thing is that I am storing blobs (bitmaps) into the table. I would
> like to find a way to archive the blobs on a CD, based on the last
> date that blob was loaded by the client, in a way to "relieve" the
> database of rarely looked at bitmaps.
>
> the way it is now, the blobs are stored in the same line as the data
> pertaining to that bitmap (like
> filesize,height,width,filename,bitmap:blob)
>
> if a bitmap has not be "loaded" by the client after a certain time
> (say, 3 months), this bitmap would be extracted from the DB, marked as
> such in the table (like online:boolean, CD_ID) and stored offline, on
> a removable media (CDR).
>
> what I just remembered is that the blob is loaded "on demand", but the
> line itself may have been "read" many time in, say, a grid that has a
> "select *"
>
> so, the only way I can see here is by changing the "last_access" via
> the client app. this will naturally advert the speed and push the
> traffic upward, but I see no other ways.
>
> But many some of you do...
>
> I hope I made myself clearer :-)
>
> Spou
>
> --- In IBObjects@y..., spou@s... wrote:
> > Hi there fellow IBO'ers
> >
> > I am looking for a way to store, on each record of my table, the
> date
> > this record was last read.
> >
> > I dont really know where to start, if it is possible, and even if
> the
> > gbak utility would mark a record read on it's daily run.
> >
> > should it be done in a trigger? by the client itself ? Should I try
> > going there via some kind of logs? humm...
> >
> > This is all higly experimental, let's say. So, all suggestions and
> > ideas are welcome.
> >
> > TIA,
> >
> > Spou
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>