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: SQL Problem w/MINUS

Re: SQL Problem w/MINUS

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 26 Sep 2000 07:57:48 +0200
Message-ID: <r6e0ts8be9ej21p3hrt6q8iku3sco9ols3@4ax.com>

I suggest avoiding 8.1.x releases for a few months: This is of course a way too exaggerated remark. This is a typical case of someone starting to shout when he finds one single bug. How many bugs are there in Linux? How many 'flavours' of Linux there are? Do you expect Oracle is going to certify on whatever crappy combination of gcc, jre and so on libraries a customer may have assemble. Compared to Linux, platforms like NT or Solaris are way more stable, because they don't change on the fly. How many bugs do you think there are In Microsoft products? In Sqlserver? Are you waiting for the next release on those products too? You could wait just 4ever.

As to your advice re replacing it by pl/sql, this is one of the strangest suggestions I ever saw. Without special measures, pl/sql will perform single record fetches, which is way slower than using ordinary sql. The general guideline is exactly contrary to what you suggest: If you can do it using SQL, do it using SQL.

Regards,

Sybrand Bakker, Oracle DBA

On Mon, 25 Sep 2000 23:20:33 -0400, "Steve Long" <steven.long_at_erols.com> wrote:

>there are plenty of bugs in 8.1.x. another site found where sum(x) doesn't
>add properly! and on linux, things could be worse! i suggest avoiding
>8.1.x releases for another 12 months.
>
>as for the minus problem...i suppose the 'm' is for million rather than
>1,000s, in which case you may be using more resources than what are
>available. i suggest you consider using pl/sql. it may be slower, but it
>can control resource consumption much better. or you could try a subquery,
>but you may run into similar problems.
>
>select cust_nbr
>from customer
>where
> age >= 30
>and
> cust_nbr in
> (select cust_nbr
> from order
> where amount < 10
> )
>
>
>"Steve Fuller" <sfulle_at_alltel.net> wrote in message
>news:8qohs8$cf$1_at_iac5.navix.net...
>> Hi All,
>>
>>
>> I am using Oracle 8.1.6 on a Linux platform and I am finding unwanted
>> results from a SQL statement that uses the
>> MINUS clause.
>>
>> select cust_nbr from customer where age >= 30
>> minus
>> select cust_nbr from order where amount >= 10
>>
>>
>> The customer table has about 14m rows and the order table has 60m rows.
>> I am trying to select all customers that have a single purchase of 10 or
>> more.
>> At the end I run reports on the result set and I get customers that are
 less
>> than 30
>> Questions
>> <1> Is there a better way write this select?
>> <2> Are there any problems with using the MINUS clause
>> <3> Are there any bugs related to SQL within Oracle for Linux
>>
>> Thanks
>>
>> Steve Fuller
>>
>>
>
  Received on Tue Sep 26 2000 - 00:57:48 CDT

Original text of this message

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