I have a query that takes about two minutes and returns 97 rows.
If I change the query only by adding ROWNUM to the outermost
select clause, the query never returns (I let it run overnight).
I'm not using ROWNUM in the where clause, I'm just selecting it.
I can't think of any reason that just selecting ROWNUM would make any
difference. This is Orace 8.1
I spent a day searching Google groups without finding anything on this.
Any ideas?
Thanks in advance,
Paul 2 3975
Paul Bradford wrote: I have a query that takes about two minutes and returns 97 rows. If I change the query only by adding ROWNUM to the outermost select clause, the query never returns (I let it run overnight). I'm not using ROWNUM in the where clause, I'm just selecting it. I can't think of any reason that just selecting ROWNUM would make any difference. This is Orace 8.1
I spent a day searching Google groups without finding anything on this.
Any ideas?
Thanks in advance,
Paul
Crystal ball is in the repair shop. Why not post the query, explain
plan, etc?
--
Regards, Frank van Bortel
> Paul Bradford wrote: I have a query that takes about two minutes and returns 97 rows. If I change the query only by adding ROWNUM to the outermost select clause, the query never returns (I let it run overnight). I'm not using ROWNUM in the where clause, I'm just selecting it. I can't think of any reason that just selecting ROWNUM would make any difference.
For reasons I don't understand, adding ROWNUM caused a different
(and worse) execution plan. After I added some hints to get a good
execution plan, my problem is solved. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Kevin Crosbie |
last post by:
Hi all,
(Sorry for the cross-post, there doesn't appear to be much activity on
comp.database.oracle)I'm trying to get the last 300 rows from the difference
between 2 large
tables and my queries are taking at least 10 minutes to do this.
I'm running on quite a fast server and the tables are not very large,
3,000,000 to 30,000,000 rows.
I've tried the following:
|
by: Sandy |
last post by:
I am trying to do the following:
EXEC SQL
UPDATE MY TABLE
SET COL1 = :newValue
WHERE COL1 = 0
AND ROWNUM = 1
ORDER BY COL2;
(index on COL1, COL2)
|
by: Agoston Bejo |
last post by:
Take a look at the following example:
table T(i INTEGER, j INTEGER)
I want to get the value of i where j is minimal and some conditions apply.
(1)
SELECT i FROM T
WHERE
AND j
|
by: pierig.gueguen |
last post by:
Hello,
I would like to know if the equivalent Oracle rownum exist in
SQLServer. Here is a sample SQL code to explain what I want to do :
select
jobs.name,
jobs.job_id,
jobs.description,
hist.message,
|
by: uthuras |
last post by:
Machine : AIX 5.2
Product : UDB DB2 Release 8.1 FP4a
I have problem loading data into destination table. The data file is
huge with more than 6 Million records. This what i have done
1. Export the data into flat file (del format)
2. use the load command to load the data
At step 2, i found that there are some errors registered in the load
| |
by: Bernard Lebel |
last post by:
Hello,
I'm stumbled at a serious problem, and quite frankly getting
desparate. This is a rather long-winded one so I'll try to get
straight to the point.
I have this Python program, that performs MySQL queries to a database.
These queries are performed at regular intervals. Basically it is
looking for fields that match certain criterias. Such fields are not
present at all time. When the program finds such field, it then takes
|
by: krishhhna |
last post by:
If we want to retrive 5,6,7 rows from a table,then we used rownum in a query in group by clause,but my doubt is rownum has individual values for each rows then how did you group rows based on rownum?
|
by: pradeep kaltari |
last post by:
Hi All,
I was just going through EMP table in oracle Scott schema.
Say, I want to find out the first employee in alphabetical order who's name starts with 'A'. the following query gives me the desired result:
SELECT *
FROM ( SELECT ENAME
FROM EMP
WHERE UPPER(ENAME) LIKE 'A%'
ORDER BY ENAME ASC
|
by: Paul Bradford |
last post by:
I have a query that takes about two minutes and returns 97 rows.
If I change the query only by adding ROWNUM to the outermost
select clause, the query never returns (I let it run overnight).
I'm not using ROWNUM in the where clause, I'm just selecting it.
I can't think of any reason that just selecting ROWNUM would make any
difference. This is Orace 8.1
I spent a day searching Google groups without finding anything on this.
Any ideas?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |