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

Home -> Community -> Usenet -> c.d.o.server -> Re: [Q]SQL Question

Re: [Q]SQL Question

From: Ng K C Paul <paulkcng_at_news.netvigator.com>
Date: 1998/10/05
Message-ID: <6v9leu$3r$1@imsp009a.netvigator.com>#1/1

Is there any performance difference between self-join and join two temp tables?

fli_at_acunet.net wrote:
: First I wonder if you type something wrong .
:
: row 1 and row 2 row 3 and row 4 row 5 and row 6 ??????????????? wrong?
: should be 7 and 8 9 and 10 right? row 6 and row 7 row 8 and row 9 row 9
: and row 10 If it is, then the most simple way to do it, if you don't have
: million of rows is just create two temp tables contain odd, even rows each,
: join them and do the calculation....... You can try to do it in one step
: self-join the table....
:
:
:
: In article <6uv891$69g$1_at_imsp009a.netvigator.com>,
: paulkcng_at_news.netvigator.com (Ng K C Paul) wrote:
: > How can I select the result after I add a rownumber or identity to the table?
: >
: > Kristian Damm Jensen (kristian-Damm.Jensen_at_capgemini.dk) wrote:
: > : Ng K C Paul wrote:
: > :
: > : > Put it in this way may be simpler. I want to calculate differences of
: > : > values of
: > : > row 1 and row 2
: > : > row 3 and row 4
: > : > row 5 and row 6
: > : > row 6 and row 7
: > : > row 8 and row 9
: > : > row 9 and row 10
: > : >
: > : >
: > :
: > : I thought so, when I saw your previous post.
: > :
: > : The problem is: SQL has no concept of row numbers! There is not inherent
: > : ordering of the table. True, there is on the physical level, but if you want
: > : to work on a relational database you should only in extreme circumstances
: > : refer to the physical level.
: > :
: > : As for your problem: I don't think it can be solved in any reasonable way
: > : without explicitly adding rownumber to the table.
: > :
: > : (Unless, of course you want to consider using cursors... But I was talking
: > : SQL, not embedded SQL.)
: > :
: > : regards,
: > : Kristian
: > :
: > : < rest of posting deleted>
: > :
: >
:
: -----------== Posted via Deja News, The Discussion Network ==----------
: http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Mon Oct 05 1998 - 00:00:00 CDT

Original text of this message

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