Q:

Oracle Statement performance: Retrieve primary keys exluding combined foreign keys

For my application I need to retrieve the primary key columns of all tables of a certain database schema, excluding those columns which are also a foreign key.
In other words, if an M:N relation table doesn't use an own primary key but rather uses the combination of the two foreign keys as primary key, those columns shall be excluded.
Now the first part can be easily done using the following statement:
SELECT   ac.table_name,
         acc.column_name
FROM     all_constraints ac,
         all_cons_columns acc
WHERE    ac.constraint_name = acc.constraint_name
  AND    ac.constraint_type = 'P'
  AND    ac.owner = UPPER('MY_SCHEMA')
ORDER BY ac.table_name, acc.position

Executing this takes around 0.2 seconds for my case.
Now I've tried excluding the combined foreign keys using the following addition:
  AND    NOT EXISTS(
   SELECT 1
   FROM   all_constraints ac1, all_cons_columns acc1
   WHERE  ac1.constraint_name = acc1.constraint_name
     AND  ac1.owner = ac.owner
     AND  ac1.table_name = ac.table_name
     AND  acc1.column_name = acc.column_name
     AND  ac1.constraint_type = 'R'
  )

Executing the whole statement now takes around 2.5 seconds.
Is there a more efficient way to get the same result?
I could always execute two separate queries, put the results in lists and remove entries of list 2 from list 1 in code, but I would prefer having a single statement solution.
To make this question less subjective I will have these rules:

I will upvote any answer I consider helpful (I always do)
I will accept the first answer which brings execution time below one second

PS: I'm using Oracle 10g and the statement is executed from a .NET application using Oracle.DataAccess.dll, but I get almost the same execution times from SqlDeveloper.

Solution:
Based on Don Bracuk's answer, I've managed to get execution time down to around 120ms using the following statement:
SELECT   table_name, column_name
FROM
(
  SELECT ac.table_name, acc.column_name
  FROM   all_constraints ac, all_cons_columns acc
  WHERE  ac.constraint_type = 'P'
    AND  ac.owner = UPPER('my_schema')
    -- if you wondered, "UPPER" is used as 'my_schema' is inserted at runtime
  MINUS  
  SELECT ac1.table_name, acc1.column_name
  FROM   all_constraints ac1, all_cons_columns acc1
  WHERE  ac1.constraint_type = 'P'
    AND  ac1.owner = UPPER('my_schema')
)
ORDER BY table_name;

A:

You could try this structure:
select yourfields
from yourtables
where whatever
and somefield in 
(select somefield
 fromyourtables
 where the conditions are the same as above
 minus
 select the same field
 from whereever
 where you want to exclude it)

If it were my problem, I'd consider it worth trying.

