Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Display last records in a table

Re: Display last records in a table

From: Michael Dodd <doddme_at_mindspring.com>
Date: Wed, 30 May 2001 18:09:19 -0500
Message-ID: <ftuahtonk2kr4caoihfultk6jgm7h4ma0i@4ax.com>

On Wed, 30 May 2001 11:22:19 +0100, "Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote:

>"Michael Dodd" <doddme_at_mindspring.com> wrote in message
>news:e0a8htgisn8gi0gpgpu0arnii5p6vumjep_at_4ax.com...
>> BTW: Before anyone jumps on my statement about the table dump- I know
>> that dumping isn't a guarantee of order, that's what is funny about
>> it, people do the dump THINKING this is the best way to view the last
>> records. There is no good way to do this - live with it or without
>> it. You can't fool mother nature or Larry Ellison.
>PMFJI
>
>But there is a good way to do this. Get the design right in the first place.
>If it is a design requirement to be able to view the last n records added a
>sequence number or timestamp is the right way to do it.
>
>An alternative (though a nasty one in terms of resources) is to use some
>sort of auditing scheme.

I agree. I believe too many projects are rushed to completion before a design is finished, let alone a design review. A logical model, physical model. This is not something new, it isn't something that's going away soon. Business does not care about requirement gathering, planning, designing, testing, they just want to know what the bottom line is, even if they know the answer is hog-wash- they still want that number. I've seen it time and time again.

I think we all agree that the right thing to do is either a sequence number or a timestamp, I like the timestamp because it gives you a little more information for not a lot more space.

I think there is an academic discussion going on here, when I felt the original discussion was geared toward grabbing some (10) records from the top of the pile, without too much concern if they were the absolute last 10 records. It's easy to pull from the first few entered with rownum < 11. (yeah, theoretically the records retrieved may not be the absolute first entered).

If your users requirement is for pulling the last 10 entered records, then you have a real problem on your hands, it can't be done, I can see log miner perhaps, but this is not something you want to do on any regular basis, not something you'd want to program. Yell at the designers, yell at the management that rushed it to completion. But if someone just wants to check under the hood and see what some recently entered records look like, you can do what I suggest. Received on Wed May 30 2001 - 18:09:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US