Pagination query help needed for large table - force a different index

I'm using a slight modification of the pagination query from over at Ask Tom's: [http://www.oracle.com/technology/oramag/oracle/07-jan/o17asktom.html]
Mine looks like this when fetching the first 100 rows of all members with last name Smith, ordered by join date:
SELECT members.*
FROM members,
    SELECT RID, rownum rnum
    FROM
        SELECT rowid as RID
        FROM members
        WHERE last_name = 'Smith'
        ORDER BY joindate
    WHERE rownum <= 100
WHERE rnum >= 1
         and RID = members.rowidThe difference between this and the one at Ask Tom's is that my innermost query just returns the ROWID. Then in the outermost query we join the ROWIDs returned to the members table, after we have pruned the ROWIDs down to only the chunk of 100 we want. This makes it MUCH faster (verifiably) on our large tables, as it is able to use the index on the innermost query (well... read on).
The problem I have is this:
SELECT rowid as RID
FROM members
WHERE last_name = 'Smith'
ORDER BY joindateThis will use the index for the predicate column (last_name) instead of the unique index I have defined for the joindate column (joindate, sequence). (Verifiable with explain plan). It is much slower this way on a large table. So I can hint it using either of the following methods:
SELECT /*+ index(members, joindate_idx) */ rowid as RID
FROM members
WHERE last_name = 'Smith'
ORDER BY joindate
SELECT /*+ first_rows(100) */ rowid as RID
FROM members
WHERE last_name = 'Smith'
ORDER BY joindateEither way, it now uses the index of the ORDER BY column (joindate_idx), so now it is much faster as it does not have to do a sort (remember, VERY large table, millions of records). So that seems good. But now, on my outermost query, I join the rowid with the meaningful columns of data from the members table, as commented below:
SELECT members.*      -- Select all data from members table
FROM members,           -- members table added to FROM clause
    SELECT RID, rownum rnum
    FROM
        SELECT /*+ index(members, joindate_idx) */ rowid as RID   -- Hint is ignored now that I am joining in the outer query
        FROM members
        WHERE last_name = 'Smith'
        ORDER BY joindate
    WHERE rownum <= 100
WHERE rnum >= 1
        and RID = members.rowid           -- Merge the members table on the rowid we pulled from the inner queriesOnce I do this join, it goes back to using the predicate index (last_name) and has to perform the sort once it finds all matching values (which can be a lot in this table, there is high cardinality on some columns).
So my question is, in the full query above, is there any way I can get it to use the ORDER BY column for indexing to prevent it from having to do a sort? The join is what causes it to revert back to using the predicate index, even with hints. Remove the join and just return the ROWIDs for those 100 records and it flies, even on 10 million records.
It'd be great if there was some generic hint that could accomplish this, such that if we change the table/columns/indexes, we don't need to change the hint (the FIRST_ROWS hint is a good example of this, while the INDEX hint is the opposite), but any help would be appreciated. I can provide explain plans for any of the above if needed.
Thanks!

Lakmal Rajapakse wrote:
OK here is an example to illustrate the advantage:
SQL> set autot traceonly
SQL> select * from (
2  select a.*, rownum x  from
3  (
4  select a.* from aoswf.events a
5  order by EVENT_DATETIME
6  ) a
7  where rownum <= 1200
8  )
9  where x >= 1100
10  /
101 rows selected.
Execution Plan
Plan hash value: 3711662397
| Id  | Operation                      | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT               |            |  1200 |   521K|   192   (0)| 00:00:03 |
|*  1 |  VIEW                          |            |  1200 |   521K|   192   (0)| 00:00:03 |
|*  2 |   COUNT STOPKEY                |            |       |       |            |          |
|   3 |    VIEW                        |            |  1200 |   506K|   192   (0)| 00:00:03 |
|   4 |     TABLE ACCESS BY INDEX ROWID| EVENTS     |   253M|    34G|   192   (0)| 00:00:03 |
|   5 |      INDEX FULL SCAN           | EVEN_IDX02 |  1200 |       |     2   (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("X">=1100)
2 - filter(ROWNUM<=1200)
Statistics
0  recursive calls
0  db block gets
443  consistent gets
0  physical reads
0  redo size
25203  bytes sent via SQL*Net to client
281  bytes received via SQL*Net from client
8  SQL*Net roundtrips to/from client
0  sorts (memory)
0  sorts (disk)
101  rows processed
SQL>
SQL>
SQL> select * from aoswf.events a, (
2  select rid, rownum x  from
3  (
4  select rowid rid from aoswf.events a
5  order by EVENT_DATETIME
6  ) a
7  where rownum <= 1200
8  ) b
9  where x >= 1100
10  and a.rowid = rid
11  /
101 rows selected.
Execution Plan
Plan hash value: 2308864810
| Id  | Operation                   | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT            |            |  1200 |   201K|   261K  (1)| 00:52:21 |
|   1 |  NESTED LOOPS               |            |  1200 |   201K|   261K  (1)| 00:52:21 |
|*  2 |   VIEW                      |            |  1200 | 30000 |   260K  (1)| 00:52:06 |
|*  3 |    COUNT STOPKEY            |            |       |       |            |          |
|   4 |     VIEW                    |            |   253M|  2895M|   260K  (1)| 00:52:06 |
|   5 |      INDEX FULL SCAN        | EVEN_IDX02 |   253M|  4826M|   260K  (1)| 00:52:06 |
|   6 |   TABLE ACCESS BY USER ROWID| EVENTS     |     1 |   147 |     1   (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("X">=1100)
3 - filter(ROWNUM<=1200)
Statistics
8  recursive calls
0  db block gets
117  consistent gets
0  physical reads
0  redo size
27539  bytes sent via SQL*Net to client
281  bytes received via SQL*Net from client
8  SQL*Net roundtrips to/from client
0  sorts (memory)
0  sorts (disk)
101  rows processed
Lakmal (and OP),
Not sure what advantage you are trying to show here. But considering that we are talking about pagination query here and order of records is important, your 2 queries will not always generate output in same order. Here is the test case:
SQL> select * from v$version ;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE     10.2.0.1.0     Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> show parameter optimizer
NAME                                 TYPE        VALUE
optimizer_dynamic_sampling           integer     2
optimizer_features_enable            string      10.2.0.1
optimizer_index_caching              integer     0
optimizer_index_cost_adj             integer     100
optimizer_mode                       string      ALL_ROWS
optimizer_secure_view_merging        boolean     TRUE
SQL> show parameter pga
NAME                                 TYPE        VALUE
pga_aggregate_target                 big integer 103M
SQL> create table t nologging as select * from all_objects where 1 = 2 ;
Table created.
SQL> create index t_idx on t(last_ddl_time) nologging ;
Index created.
SQL> insert /*+ APPEND */ into t (owner, object_name, object_id, created, last_ddl_time) select owner, object_name, object_id, created, sysdate - dbms_random.value(1, 100) from all_objects order by dbms_random.random;
40617 rows created.
SQL> commit ;
Commit complete.
SQL> exec dbms_stats.gather_table_stats(user, 'T', cascade=>true);
PL/SQL procedure successfully completed.
SQL> select object_id, object_name, created from t, (select rid, rownum rn from (select rowid rid from t order by created desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
OBJECT_ID OBJECT_NAME                    CREATED
     47686 ALL$OLAP2_JOIN_KEY_COLUMN_USES 28-JUL-2009 08:08:39
     47672 ALL$OLAP2_CUBE_DIM_USES        28-JUL-2009 08:08:39
     47681 ALL$OLAP2_CUBE_MEASURE_MAPS    28-JUL-2009 08:08:39
     47682 ALL$OLAP2_FACT_LEVEL_USES      28-JUL-2009 08:08:39
     47685 ALL$OLAP2_AGGREGATION_USES     28-JUL-2009 08:08:39
     47692 ALL$OLAP2_CATALOGS             28-JUL-2009 08:08:39
     47665 ALL$OLAPMR_FACTTBLKEYMAPS      28-JUL-2009 08:08:39
     47688 ALL$OLAP2_DIM_LEVEL_ATTR_MAPS  28-JUL-2009 08:08:39
     47689 ALL$OLAP2_DIM_LEVELS_KEYMAPS   28-JUL-2009 08:08:39
     47669 ALL$OLAP9I2_HIER_DIMENSIONS    28-JUL-2009 08:08:39
     47666 ALL$OLAP9I1_HIER_DIMENSIONS    28-JUL-2009 08:08:39
11 rows selected.
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
OBJECT_ID OBJECT_NAME                    LAST_DDL_TIME
     11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
     13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
     37534 com/sun/mail/smtp/SMTPMessage  06-FEB-2010 03:46:14
     36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
     26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
     16695 /2940a364_RepIdDelegator_1_3   06-FEB-2010 03:38:17
     36539 sun/io/ByteToCharMacHebrew     06-FEB-2010 03:28:57
     14044 /d29b81e1_OldHeaders           06-FEB-2010 03:12:12
     12920 /25f8f3a5_BasicSplitPaneUI     06-FEB-2010 03:11:06
     42266 SI_GETCLRHSTGRFTR              06-FEB-2010 03:40:20
     15752 /2f494dce_JDWPThreadReference  06-FEB-2010 03:09:31
11 rows selected.
SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 ;
OBJECT_ID OBJECT_NAME                    LAST_DDL_TIME
     37534 com/sun/mail/smtp/SMTPMessage  06-FEB-2010 03:46:14
     13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
     11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
     42266 SI_GETCLRHSTGRFTR              06-FEB-2010 03:40:20
     16695 /2940a364_RepIdDelegator_1_3   06-FEB-2010 03:38:17
     36539 sun/io/ByteToCharMacHebrew     06-FEB-2010 03:28:57
     26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
     14044 /d29b81e1_OldHeaders           06-FEB-2010 03:12:12
     36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
     12920 /25f8f3a5_BasicSplitPaneUI     06-FEB-2010 03:11:06
     15752 /2f494dce_JDWPThreadReference  06-FEB-2010 03:09:31
11 rows selected.
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid order by last_ddl_time desc ;
OBJECT_ID OBJECT_NAME                    LAST_DDL_TIME
     37534 com/sun/mail/smtp/SMTPMessage  06-FEB-2010 03:46:14
     13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
     11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
     42266 SI_GETCLRHSTGRFTR              06-FEB-2010 03:40:20
     16695 /2940a364_RepIdDelegator_1_3   06-FEB-2010 03:38:17
     36539 sun/io/ByteToCharMacHebrew     06-FEB-2010 03:28:57
     26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
     14044 /d29b81e1_OldHeaders           06-FEB-2010 03:12:12
     36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
     12920 /25f8f3a5_BasicSplitPaneUI     06-FEB-2010 03:11:06
     15752 /2f494dce_JDWPThreadReference  06-FEB-2010 03:09:31
11 rows selected.
SQL> set autotrace traceonly
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid order by last_ddl_time desc
  2  ;
11 rows selected.
Execution Plan
Plan hash value: 44968669
| Id  | Operation                       | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT                |       |  1200 | 91200 |   180   (2)| 00:00:03 |
|   1 |  SORT ORDER BY                  |       |  1200 | 91200 |   180   (2)| 00:00:03 |
|*  2 |   HASH JOIN                     |       |  1200 | 91200 |   179   (2)| 00:00:03 |
|*  3 |    VIEW                         |       |  1200 | 30000 |    98   (0)| 00:00:02 |
|*  4 |     COUNT STOPKEY               |       |       |       |            |          |
|   5 |      VIEW                       |       | 40617 |   475K|    98   (0)| 00:00:02 |
|   6 |       INDEX FULL SCAN DESCENDING| T_IDX | 40617 |   793K|    98   (0)| 00:00:02 |
|   7 |    TABLE ACCESS FULL            | T     | 40617 |  2022K|    80   (2)| 00:00:01 |
Predicate Information (identified by operation id):
   2 - access("T".ROWID="T1"."RID")
   3 - filter("RN">=1190)
   4 - filter(ROWNUM<=1200)
Statistics
          1  recursive calls
          0  db block gets
        348  consistent gets
          0  physical reads
          0  redo size
       1063  bytes sent via SQL*Net to client
        385  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          1  sorts (memory)
          0  sorts (disk)
         11  rows processed
SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 ;
11 rows selected.
Execution Plan
Plan hash value: 882605040
| Id  | Operation                | Name | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT         |      |  1200 | 62400 |    80   (2)| 00:00:01 |
|*  1 |  VIEW                    |      |  1200 | 62400 |    80   (2)| 00:00:01 |
|*  2 |   COUNT STOPKEY          |      |       |       |            |          |
|   3 |    VIEW                  |      | 40617 |  1546K|    80   (2)| 00:00:01 |
|*  4 |     SORT ORDER BY STOPKEY|      | 40617 |  2062K|    80   (2)| 00:00:01 |
|   5 |      TABLE ACCESS FULL   | T    | 40617 |  2062K|    80   (2)| 00:00:01 |
Predicate Information (identified by operation id):
   1 - filter("RN">=1190)
   2 - filter(ROWNUM<=1200)
   4 - filter(ROWNUM<=1200)
Statistics
          0  recursive calls
          0  db block gets
        343  consistent gets
          0  physical reads
          0  redo size
       1063  bytes sent via SQL*Net to client
        385  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          1  sorts (memory)
          0  sorts (disk)
         11  rows processed
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
11 rows selected.
Execution Plan
Plan hash value: 168880862
| Id  | Operation                      | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT               |       |  1200 | 91200 |   179   (2)| 00:00:03 |
|*  1 |  HASH JOIN                     |       |  1200 | 91200 |   179   (2)| 00:00:03 |
|*  2 |   VIEW                         |       |  1200 | 30000 |    98   (0)| 00:00:02 |
|*  3 |    COUNT STOPKEY               |       |       |       |            |          |
|   4 |     VIEW                       |       | 40617 |   475K|    98   (0)| 00:00:02 |
|   5 |      INDEX FULL SCAN DESCENDING| T_IDX | 40617 |   793K|    98   (0)| 00:00:02 |
|   6 |   TABLE ACCESS FULL            | T     | 40617 |  2022K|    80   (2)| 00:00:01 |
Predicate Information (identified by operation id):
   1 - access("T".ROWID="T1"."RID")
   2 - filter("RN">=1190)
   3 - filter(ROWNUM<=1200)
Statistics
          0  recursive calls
          0  db block gets
        349  consistent gets
          0  physical reads
          0  redo size
       1063  bytes sent via SQL*Net to client
        385  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
         11  rows processed
SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 order by last_ddl_time desc ;
11 rows selected.
Execution Plan
Plan hash value: 882605040
| Id  | Operation           | Name | Rows     | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT      |     |  1200 | 62400 |    80   (2)| 00:00:01 |
|*  1 |  VIEW                |     |  1200 | 62400 |    80   (2)| 00:00:01 |
|*  2 |   COUNT STOPKEY       |     |     |     |          |          |
|   3 |    VIEW            |     | 40617 |  1546K|    80   (2)| 00:00:01 |
|*  4 |     SORT ORDER BY STOPKEY|     | 40617 |  2062K|    80   (2)| 00:00:01 |
|   5 |      TABLE ACCESS FULL      | T     | 40617 |  2062K|    80   (2)| 00:00:01 |
Predicate Information (identified by operation id):
   1 - filter("RN">=1190)
   2 - filter(ROWNUM<=1200)
   4 - filter(ROWNUM<=1200)
Statistics
     175  recursive calls
       0  db block gets
     388  consistent gets
       0  physical reads
       0  redo size
       1063  bytes sent via SQL*Net to client
     385  bytes received via SQL*Net from client
       2  SQL*Net roundtrips to/from client
       4  sorts (memory)
       0  sorts (disk)
      11  rows processed
SQL> set autotrace off
SQL> spool offAs you will see, the join query here has to have an ORDER BY clause at the end to ensure that records are correctly sorted. You can not rely on optimizer choosing NESTED LOOP join method and, as above example shows, when optimizer chooses HASH JOIN, oracle is free to return rows in no particular order.
The query that does not involve join always returns rows in the desired order. Adding an ORDER BY does add a step in the plan for the query using join but does not affect the other query.

Similar Messages

  • Query help needed for querybuilder to use with lcm cli

    Hi,
    I had set up several queries to run with the lcm cli in order to back up personal folders, inboxes, etc. to lcmbiar files to use as backups.  I have seen a few posts that are similar, but I have a specific question/concern.
    I just recently had to reference one of these back ups only to find it was incomplete.  Does the query used by the lcm cli also only pull the first 1000 rows? Is there a way to change this limit somwhere?
    Also, since when importing this lcmbiar file for something 'generic' like 'all personal folders', pulls in WAY too much stuff, is there a better way to limit this? I am open to suggestions, but it would almost be better if I could create individual lcmbiar output files on a per user basis.  This way, when/if I need to restore someone's personal folder contents, for example, I could find them by username and import just that lcmbiar file, as opposed to all 3000 of our users.  I am not quite sure how to accomplish this...
    Currently, with my limited windows scripting knowledge, I have set up a bat script to run each morning, that creates a 'runtime' properties file from a template, such that the lcmbiar file gets named uniquely for that day and its content.  Then I call the lcm_cli using the proper command.  The query within the properties file is currently very straightforward - select * from CI_INFOOBJECTS WHERE SI_ANCESTOR = 18.
    To do what I want to do...
    1) I'd first need a current list of usernames in a text file, that could be read (?) in and parsed to single out each user (remember we are talking about 3000) - not sure the best way to get this.
    2) Then instead of just updating the the lcmbiar file name with a unique name as I do currently, I would also update the query (which would be different altogether):  SELECT * from CI_INFOOBJECTS where SI_OWNER = '<username>' AND SI_ANCESTOR = 18.
    In theory, that would grab everything owned by that user in their personal folder - right? and write it to its own lcmbiar file to a location I specify.
    I just think chunking something like this is more effective and BO has no built in back up capability that already does this.  We are on BO 4.0 SP7 right now, move to 4.1 SP4 over the summer.
    Any thoughts on this would be much appreciated.
    thanks,
    Missy

    Just wanted to pass along that SAP Support pointed me to KBA 1969259 which had some good example queries in it (they were helping me with a concern I had over the lcmbiar file output, not with query design).  I was able to tweak one of the sample queries in this KBA to give me more of what I was after...
    SELECT TOP 10000 static, relationships, SI_PARENT_FOLDER_CUID, SI_OWNER, SI_PATH FROM CI_INFOOBJECTS,CI_APPOBJECTS,CI_SYSTEMOBJECTS WHERE (DESCENDENTS ("si_name='Folder Hierarchy'","si_name='<username>'"))
    This exports inboxes, personal folders, categories, and roles, which is more than I was after, but still necessary to back up.. so in a way, it is actually better because I have one lcmbiar file per user - contains all their 'personal' objects.
    So between narrowing down my set of users to only those who actually have saved things to their personal folder and now having a query that actually returns what I expect it to return, along with the help below for a job to clean up these excessive amounts of promotion jobs I am now creating... I am all set!
    Hopefully this can help someone else too!
    Thanks,
    missy

  • Help needed for SAP Tables Relationships

    Hi All,
    I am new to ERP and need help regarding standard SAP Tables.
    Please share the document that contains the details of SAP Tables and Standard SAP FM that are provided by SAP.
    All helpful answers will be rewarded.
    Regards,
    Udaya.

    Hi,
    Please go to the following link.
    http://www.erpgenie.com/abap/tables.htm
    http://www.erpgenie.com/abap/tables_sd.htm
    http://www.erpgenie.com/abap/tables_mm.htm
    http://www.erpgenie.com/abap/tables_fi.htm
    Regards
    Jean

  • Tweak for sql query - help needed for smalll change

    Hi.
    I am trying to run a script that checks for used space on all tablespaces and returns the results.
    So far so good:
    set lines 200 pages 2000
    col tablespace_name heading 'Tablespace' format a30 truncate
    col total_maxspace_mb heading 'MB|Max Size' format 9G999G999
    col total_allocspace_mb heading 'MB|Allocated' format 9G999G999
    col used_space_mb heading 'MB|Used' format 9G999G999D99
    col free_space_mb heading 'MB|Free Till Max' like used_space_mb
    col free_space_ext_mb heading 'MB|Free Till Ext' like used_space_mb
    col pct_used heading '%|Used' format 999D99
    col pct_free heading '%|Free' like pct_used
    break on report
    compute sum label 'Total Size:' of total_maxspace_mb total_allocspace_mb used_space_mb - free_space_mb (used_space_mb/total_maxspace_mb)*100 on report
    select
    alloc.tablespace_name,
    (alloc.total_allocspace_mb - free.free_space_mb) used_space_mb,
    free.free_space_mb free_space_ext_mb,
    ((alloc.total_allocspace_mb - free.free_space_mb)/alloc.total_maxspace_mb)*100 pct_used,
    ((free.free_space_mb+(alloc.total_maxspace_mb-alloc.total_allocspace_mb))/alloc.total_maxspace_mb)*100 pct_free
    FROM (SELECT tablespace_name,
    ROUND(SUM(CASE WHEN maxbytes = 0 THEN bytes ELSE maxbytes END)/1048576) total_maxspace_mb,
    ROUND(SUM(bytes)/1048576) total_allocspace_mb
    FROM dba_data_files
    WHERE file_id NOT IN (SELECT FILE# FROM v$recover_file)
    GROUP BY tablespace_name) alloc,
    (SELECT tablespace_name,
    SUM(bytes)/1048576 free_space_mb
    FROM dba_free_space
    WHERE file_id NOT IN (SELECT FILE# FROM v$recover_file)
    GROUP BY tablespace_name) free
    WHERE alloc.tablespace_name = free.tablespace_name (+)
    ORDER BY pct_used DESC
    The above returns something like this:
    MB MB % %
    Tablespace Used Free Till Ext Used Free
    APPS_TS_ARCHIVE 1,993.13 54.88 97.32 2.68
    APPS_TS_TX_IDX 14,756.13 1,086.88 91.37 8.63
    APPS_TS_TX_DATA 20,525.75 594.25 80.18 19.82
    APPS_TS_MEDIA 6,092.00 180.00 74.37 25.63
    APPS_TS_INTERFACE 13,177.63 366.38 71.49 28.51
    The above works fine, but I would like to further change the query so that only those tablespaces with free space less than 5% (or used space more than 95%) are returned.
    I have been working on this all morning and wanted to open it up to the masters!
    I have tried using WHERE pct_used > 95 but to no avail.
    Any advice would be appreciated.
    Many thanks.
    10.2.0.4
    Linux Red Hat 4.

    Thanks for that.
    What is confusing is that the below query works for every other (about 10 others) database but not this one (?)
    SQL> set lines 200 pages 2000
    SQL>
    SQL> col tablespace_name heading 'Tablespace' format a30 truncate
    SQL> col total_maxspace_mb heading 'MB|Max Size' format 9G999G999
    SQL> col total_allocspace_mb heading 'MB|Allocated' format 9G999G999
    SQL> col used_space_mb heading 'MB|Used' format 9G999G999D99
    SQL> col free_space_mb heading 'MB|Free Till Max' like used_space_mb
    SQL> col free_space_ext_mb heading 'MB|Free Till Ext' like used_space_mb
    SQL> col pct_used heading '%|Used' format 999D99
    SQL> col pct_free heading '%|Free' like pct_used
    SQL>
    SQL> break on report
    SQL> compute sum label 'Total Size:' of total_maxspace_mb total_allocspace_mb used_space_mb - free_space_mb (used_space_mb/total_maxspace_mb)*100 on report
    SQL>
    SQL> select /*+ALL_ROWS */
    2 alloc.tablespace_name,
    3 alloc.total_maxspace_mb,
    4 alloc.total_allocspace_mb,
    5 (alloc.total_allocspace_mb - free.free_space_mb) used_space_mb,
    6 free.free_space_mb+(alloc.total_maxspace_mb-alloc.total_allocspace_mb) free_space_mb,
    7 free.free_space_mb free_space_ext_mb,
    8 ((alloc.total_allocspace_mb - free.free_space_mb)/alloc.total_maxspace_mb)*100 pct_used,
    9 ((free.free_space_mb+(alloc.total_maxspace_mb-alloc.total_allocspace_mb))/alloc.total_maxspace_mb)*100 pct_free
    10 FROM (SELECT tablespace_name,
    11 ROUND(SUM(CASE WHEN maxbytes = 0 THEN bytes ELSE maxbytes END)/1048576) total_maxspace_mb,
    12 ROUND(SUM(bytes)/1048576) total_allocspace_mb
    13 FROM dba_data_files
    14 WHERE file_id NOT IN (SELECT FILE# FROM v$recover_file)
    15 GROUP BY tablespace_name) alloc,
    16 (SELECT tablespace_name,
    17 SUM(bytes)/1048576 free_space_mb
    18 FROM dba_free_space
    19 WHERE file_id NOT IN (SELECT FILE# FROM v$recover_file)
    20 GROUP BY tablespace_name) free
    21 WHERE alloc.tablespace_name = free.tablespace_name (+)
    22 ORDER BY pct_used DESC
    23 /
    ((alloc.total_allocspace_mb - free.free_space_mb)/alloc.total_maxspace_mb)*100 pct_used,
    ERROR at line 8:
    ORA-01476: divisor is equal to zero

  • Help Need for External Table

    Gurus,
    While i reading the data from CSV using External Table in some columns the records having the special symbol like 'new line feed'.
    How can i trim that one.
    please help in this issue.

    Hi,
    Use Substr or Replace functions on them.

  • Update sql help needed for hierarchy table

    I am trying update the gross qty field based on each unit qty. This is how the table looks.
    slevel | manager | seller |unit_qty | gross qty
    0 | mary | mary | 1 | 1
    .1 | mary | lynn| 3 | null
    .1 | mary | betty | 2 | null
    .1 | mary | alice | 2 | null
    ..2 | alice | susan | 1 | null
    .1 | mary | amy | 4 | null
    I would the table to look like this after the update, with the values
    slevel | manager| seller | unit_qty | gross qty
    0 | mary | mary | 1 | 1
    .1 | mary | lynn| 3 | 3*1 ={color:#ff0000}3{color}
    .1 | mary | betty | 2 | 2*1 ={color:#ff0000}2{color}
    .1 | mary | alice | 2 | {color:#008000}2*1{color} ={color:#ff0000}2{color}
    ..2 | alice | susan | {color:#0000ff}1{color} | {color:#008000}2*1{color}{color:#0000ff}*1{color} ={color:#ff0000}2{color}
    .1 | mary | amy | 4 | 4*1 = {color:#ff0000}4
    {color}
    This is the sql statement I tried to use without sucess.
    update table set gross_qty = unit_qty * ({color:#ff0000}select gross_qty from table{color}
    {color:#ff0000}where manager=seller{color})
    where slevel &gt;0

    Perhaps the old EXP (SUM (LN (n))) trick for calculating the product.
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> CREATE TABLE seller (
      2     manager VARCHAR2 (5),
      3     seller VARCHAR2 (5),
      4     unit_qty NUMBER,
      5     gross_qty NUMBER);
    Table created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES (NULL, 'mary', 1);
    1 row created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES ('mary', 'lynn', 3);
    1 row created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES ('mary', 'betty', 2);
    1 row created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES ('mary', 'alice', 2);
    1 row created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES ('alice', 'susan', 1);
    1 row created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES ('mary', 'amy', 4);
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> SELECT manager, seller, unit_qty, gross_qty
      2  FROM   seller;
    MANAG SELLE   UNIT_QTY  GROSS_QTY
          mary           1
    mary  lynn           3
    mary  betty          2
    mary  alice          2
    alice susan          1
    mary  amy            4
    6 rows selected.
    SQL> UPDATE seller s1
      2  SET    s1.gross_qty = (SELECT EXP (SUM (LN (s2.unit_qty)))
      3                         FROM   seller s2
      4                         START WITH s2.seller = s1.seller
      5                         CONNECT BY s2.seller = PRIOR s2.manager);
    6 rows updated.
    SQL> SELECT manager, seller, unit_qty, gross_qty
      2  FROM   seller;
    MANAG SELLE   UNIT_QTY  GROSS_QTY
          mary           1          1
    mary  lynn           3          3
    mary  betty          2          2
    mary  alice          2          2
    alice susan          1          2
    mary  amy            4          4
    6 rows selected.
    SQL>

  • Help needed  for nested  table

    Hi ,
    I have a function which returns nested table as result .The nested table can sometimes be null.So when i reference the first and last value for a loop, when table is null , then i am getting numeric value error .So i added a check on the nested table as below
    if n_table is empty then
    exit;
    end if;
    for i in n_table.first ..n_table.last
    loop
    select count(1) into_count
    from x where rate=n_table(i);
    end loop;
    Now iam getting a message as" DANGLING NOT NULL OF".Though it gets compiled .iam getting everytime when i first compile it .Please let me know what should i add to prevent this

    Null and empty are two different things. Also please post the complete error message.
    Notice the difference between
    DECLARE
        v_tab INTEGER_TT;
    BEGIN
        IF v_tab IS NOT NULL THEN
            FOR i IN v_tab.FIRST..v_tab.LAST LOOP
                DBMS_OUTPUT.PUT_LINE('Loop iteration ' || i);
            END LOOP;
        END IF;
    END;and
    DECLARE
        v_tab INTEGER_TT := INTEGER_TT();
    BEGIN
        IF v_tab IS NOT EMPTY THEN
            FOR i IN v_tab.FIRST..v_tab.LAST LOOP
                DBMS_OUTPUT.PUT_LINE('Loop iteration ' || i);
            END LOOP;
        END IF;
    END;

  • Query help needed for Sales order panel user field query.

    I have a user defined form field on sales order row level called = U_DEPFEEAMT
    1, I would like this field to get the value from a field on this sales order row level multiplied by what is in point 2 below. The details of field in point 1 is :
    Form=139, item=38, pane=1, column=10002117, and row=1
    2. The contents in field 1 should be multiplied  by a value coming from another user field linked to OITM master item.
    The details of user field attached to OITM is :
    OITM.U_DepositFeeON
    Appreciate your help.
    Thank you.

    Try this one:
    SELECT T0.U_DepositFeeON*$[$38.10002117.number\]
    FROM dbo.OITM T0
    WHERE T0.ItemCode = $[$38.1.0\]
    Thanks,
    Gordon

  • Help needed for writing query

    help needed for writing query
    i have the following tables(with data) as mentioned below
    FK*-foregin key (SUBJECTS)
    FK**-foregin key (COMBINATION)
    1)SUBJECTS(table name)     
    SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
    2           02           Computer Science
    3           03           Physics
    4           04           Chemistry
    5           05           Mathematics
    7           07           Commerce
    8           08           Computer Applications
    9           09           Biology
    2)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
    383           S1      9           4           2           3
    384           S2      4           2           5           3
    ---------I actually designed the ABOVE table also like this
    3) a)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
    383           S1
    384           S2
    b)COMBINATION_DET
    COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
    1               383          9
    2               383          4
    3               383          2
    4               383          3
    5               384          4
    6               384          2          
    7               384          5
    8               384          3
    Business rule: a combination consists of a maximum of 4 subjects (must contain)
    and the user is less relevant to a COMB_NAME(name of combinations) but user need
    the subjects contained in combinations
    i need the following output
    COMB_ID COMB_NAME SUBJECT1 SUBJECT2      SUBJECT3      SUBJECT4
    383     S1     Biology Chemistry      Computer Science Physics
    384     S2     Chemistry Computer Science Mathematics Physics
    or even this is enough(what i actually needed)
    COMB_ID     subjects
    383           Biology,Chemistry,Computer Science,Physics
    384           Chemistry,Computer Science,Mathematics,Physics
    you can use any of the COMBINATION table(either (2) or (3))
    and i want to know
    1)which design is good in this case
    (i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
    good method to link with same table but if 4 subjects only(and must) comes
    detail table is not neccessary )
    now i am achieving the result by program-coding in C# after getting the rows from oracle
    i am using oracle 9i (also ODP.NET)
    i want to know how can i get the result in the stored procedure itsef.
    2)how it could be designed in any other way.
    any help/suggestion is welcome
    thanks for your time --Pradeesh

    Well I forgot the table-alias, here now with:
    SELECT C.COMB_ID
    , C.COMB_NAME
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
    FROM COMBINATION C;
    As you need exactly 4 subjects, the columns-solution is just fine I would say.

  • Help need for force to signout All session ! how...

    hi
         help need for force to  signout All session !  how ??
    Solved!
    Go to Solution.

    Hi and welcome to the Skype Community,
    To force a signout of all instances your Skype is signed into please change your password: https://support.skype.com/en/faq/FA95/how-do-i-change-my-password
    Follow the latest Skype Community News
    ↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓

  • HS connection to MySQL fails for large table

    Hello,
    I have set up an HS to a MySql 3.51 dabatabe using an ODBC DNS. My Oracle box has version 10.2.0.1 running in Windows 2003 R2. MySQL version is 4.1.22 running on a different machine with the same OS.
    I completed the connection through a database link, which works fine in SQLPLUS when selecting small MySQL Tables. However, I keep getting an out of memory error when selecting certain large table from the MySQL database. Previously, I had tested the DNS and ran the same SELECT in Access and it doesn't give any error. This is the error thrown by SQLPLUS:
    SQL> select * from progressnotes@mysql_rmg where "encounterID" = 224720;
    select * from progressnotes@mysql_rmg where "encounterID" = 224720
    ERROR at line 1:
    ORA-00942: table or view does not exist
    [Generic Connectivity Using ODBC][MySQL][ODBC 3.51
        Driver][mysqld-4.1.22-community-nt]Lost connection to MySQL server during query
    (SQL State: S1T00; SQL Code: 2013)
    ORA-02063: preceding 2 lines from MYSQL_RMG
    I traced the HS connection and here is the result from the .trc file:
    Oracle Corporation --- THURSDAY JUN 12 2008 11:19:51.809
    Heterogeneous Agent Release
    10.2.0.1.0
    (0) [Generic Connectivity Using ODBC] version: 4.6.1.0.0070
    (0) connect string is: defTdpName=MYSQL_RMG;SYNTAX=(ORACLE8_HOA, BASED_ON=ORACLE8,
    (0) IDENTIFIER_QUOTE_CHAR="",
    (0) CASE_SENSITIVE=CASE_SENSITIVE_QUOTE);BINDING=<navobj><binding><datasources><da-
    (0) tasource name='MYSQL_RMG' type='ODBC'
    (0) connect='MYSQL_RMG'><driverProperties/></datasource></datasources><remoteMachi-
    (0) nes/><environment><optimizer noFlattener='true'/><misc year2000Policy='-1'
    (0) consumerApi='1' sessionBehavior='4'/><queryProcessor parserDepth='2000'
    (0) tokenSize='1000' noInsertParameterization='true'
    noThreadedReadAhead='true'
    (0) noCommandReuse='true'/></environment></binding></navobj>
    (0) ORACLE GENERIC GATEWAY Log File Started at 2008-06-12T11:19:51
    (0) hoadtab(26); Entered.
    (0) Table 1 - PROGRESSNOTES
    (0) [MySQL][ODBC 3.51 Driver][mysqld-4.1.22-community-nt]MySQL client ran out of
    (0) memory (SQL State: S1T00; SQL Code: 2008)
    (0) (Last message occurred 2 times)
    (0)
    (0) hoapars(15); Entered.
    (0) Sql Text is:
    (0) SELECT * FROM "PROGRESSNOTES"
    (0) [MySQL][ODBC 3.51 Driver][mysqld-4.1.22-community-nt]Lost connection to MySQL
    (0) server during query (SQL State: S1T00; SQL Code: 2013)
    (0) (Last message occurred 2 times)
    (0)
    (0) [A00D] Failed to open table MYSQL_RMG:PROGRESSNOTES
    (0)
    (0) [MySQL][ODBC 3.51 Driver]MySQL server has gone away (SQL State: S1T00; SQL
    (0) Code: 2006)
    (0) (Last message occurred 2 times)
    (0)
    (0) [MySQL][ODBC 3.51 Driver]MySQL server has gone away (SQL State: S1T00; SQL
    (0) Code: 2006)
    (0) (Last message occurred 2 times)
    (0)
    (0) [S1000] [9013]General error in nvITrans_Commit - rc = -1. Please refer to the
    (0) log file for details.
    (0) [MySQL][ODBC 3.51 Driver]MySQL server has gone away (SQL State: S1T00; SQL
    (0) Code: 2006)
    (0) (Last message occurred 2 times)
    (0)
    (0) [S1000] [9013]General error in nvITrans_Rollback - rc = -1. Please refer to
    (0) the log file for details.
    (0) Closing log file at THU JUN 12 11:20:38 2008.
    I have read the MySQL documentation and apparently there's a "Don't Cache Result (forward only cursors)" parameter in the ODBC DNS that needs to be checked in order to cache the results in the MySQL server side instead of the Driver side, but checking that parameter doesn't work for the HS connection. Instead, the SQLPLUS session throws the following message when selecting the same large table:
    SQL> select * from progressnotes@mysql_rmg where "encounterID" = 224720;
    select * from progressnotes@mysql_rmg where "encounterID" = 224720
    ERROR at line 1:
    ORA-02068: following severe error from MYSQL_RMG
    ORA-28511: lost RPC connection to heterogeneous remote agent using
    SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.120)(PORT=1521))(CONNECT_DATA=(SID=MYSQL_RMG)))
    Curiously enough, after checking the parameter, the Access connection through the DNS ODBS seems to improve!
    Is there an aditional parameter that needs to be set up in the inithsodbc.ora perhaps? These are current HS paramters:
    # HS init parameters
    HS_FDS_CONNECT_INFO = MYSQL_RMG
    HS_FDS_TRACE_LEVEL = ON
    My SID_LIST_LISTENER entry is:
    (SID_DESC =
    (PROGRAM = HSODBC)
    (SID_NAME = MYSQL_RMG)
    (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
    Finally, here is my TNSNAMES.ORA entry for the HS connection:
    MYSQL_RMG =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.120)(PORT = 1521))
    (CONNECT_DATA =
    (SID = MYSQL_RMG)
    (HS = OK)
    Your advice will be greatly appeciated,
    Thanks,
    Luis
    Message was edited by:
    lmconsite

    First of all please be aware HSODBC V10 has been desupported and DG4ODBC should be used instead.
    The root cause the problem you describe could be related to a timeout of the ODBC driver (especially while taking care of the comment: it happens only for larger tables):
    (0) [MySQL][ODBC 3.51 Driver]MySQL server has gone away (SQL State: S1T00; SQL
    (0) Code: 2006)
    indicates the Driver or the DB abends the connection due to a timeout.
    Check out the wait_timeout mysql variable on the server and increase it.

  • Gather table stats taking longer for Large tables

    Version : 11.2
    I've noticed that gathers stats (using dbms_stats.gather_table_stats) is taking longer for large tables.
    Since row count needs to be calculated, a big table's stats collection would be understandably slightly longer (Running SELECT COUNT(*) internally).
    But for a non-partitioned table with 3 million rows, it took 12 minutes to collect the stats ? Apart from row count and index info what other information is gathered for gather table stats ?
    Does Table size actually matter for stats collection ?

    Max wrote:
    Version : 11.2
    I've noticed that gathers stats (using dbms_stats.gather_table_stats) is taking longer for large tables.
    Since row count needs to be calculated, a big table's stats collection would be understandably slightly longer (Running SELECT COUNT(*) internally).
    But for a non-partitioned table with 3 million rows, it took 12 minutes to collect the stats ? Apart from row count and index info what other information is gathered for gather table stats ?
    09:40:05 SQL> desc user_tables
    Name                            Null?    Type
    TABLE_NAME                       NOT NULL VARCHAR2(30)
    TABLESPACE_NAME                        VARCHAR2(30)
    CLUSTER_NAME                             VARCHAR2(30)
    IOT_NAME                             VARCHAR2(30)
    STATUS                              VARCHAR2(8)
    PCT_FREE                             NUMBER
    PCT_USED                             NUMBER
    INI_TRANS                             NUMBER
    MAX_TRANS                             NUMBER
    INITIAL_EXTENT                         NUMBER
    NEXT_EXTENT                             NUMBER
    MIN_EXTENTS                             NUMBER
    MAX_EXTENTS                             NUMBER
    PCT_INCREASE                             NUMBER
    FREELISTS                             NUMBER
    FREELIST_GROUPS                        NUMBER
    LOGGING                             VARCHAR2(3)
    BACKED_UP                             VARCHAR2(1)
    NUM_ROWS                             NUMBER
    BLOCKS                              NUMBER
    EMPTY_BLOCKS                             NUMBER
    AVG_SPACE                             NUMBER
    CHAIN_CNT                             NUMBER
    AVG_ROW_LEN                             NUMBER
    AVG_SPACE_FREELIST_BLOCKS                   NUMBER
    NUM_FREELIST_BLOCKS                        NUMBER
    DEGREE                              VARCHAR2(10)
    INSTANCES                             VARCHAR2(10)
    CACHE                                  VARCHAR2(5)
    TABLE_LOCK                             VARCHAR2(8)
    SAMPLE_SIZE                             NUMBER
    LAST_ANALYZED                             DATE
    PARTITIONED                             VARCHAR2(3)
    IOT_TYPE                             VARCHAR2(12)
    TEMPORARY                             VARCHAR2(1)
    SECONDARY                             VARCHAR2(1)
    NESTED                              VARCHAR2(3)
    BUFFER_POOL                             VARCHAR2(7)
    FLASH_CACHE                             VARCHAR2(7)
    CELL_FLASH_CACHE                        VARCHAR2(7)
    ROW_MOVEMENT                             VARCHAR2(8)
    GLOBAL_STATS                             VARCHAR2(3)
    USER_STATS                             VARCHAR2(3)
    DURATION                             VARCHAR2(15)
    SKIP_CORRUPT                             VARCHAR2(8)
    MONITORING                             VARCHAR2(3)
    CLUSTER_OWNER                             VARCHAR2(30)
    DEPENDENCIES                             VARCHAR2(8)
    COMPRESSION                             VARCHAR2(8)
    COMPRESS_FOR                             VARCHAR2(12)
    DROPPED                             VARCHAR2(3)
    READ_ONLY                             VARCHAR2(3)
    SEGMENT_CREATED                        VARCHAR2(3)
    RESULT_CACHE                             VARCHAR2(7)
    09:40:10 SQL> >
    Does Table size actually matter for stats collection ?yes
    Handle:     Max
    Status Level:     Newbie
    Registered:     Nov 10, 2008
    Total Posts:     155
    Total Questions:     80 (49 unresolved)
    why so many unanswered questions?

  • Color management help needed for adobe CS5 and Epson printer 1400-Prints coming out too dark with re

    Color management help needed for adobe CS5 and Epson printer 1400-Prints coming out too dark with reddish cast and loss of detail
    System: Windows 7
    Adobe CS5
    Printer: Epson Stylus Photo 1400
    Paper: Inkjet matte presentation paper with slight luster
    Installed latest patch for Adobe CS5
    Epson driver up to date
    After reading solutions online and trying them for my settings for 2 days I am still unable to print what I am seeing on my screen in Adobe CS5. I calibrated my monitor, but am not sure once calibration is saved if I somehow use this setting in Photoshop’s color management.
    The files I am printing are photographs of dogs with lots of detail  I digitally painted with my Wacom tablet in Photoshop CS5 and then printed with Epson Stylus 1400 on inkjet paper 20lb with slight luster.
    My Printed images lose a lot of the detail & come out way to dark with a reddish cast and loss of detail when I used these settings in the printing window:
    Color Handling: Photoshop manages color, Color management -ICM, OFF no color adjustment.
    When I change to these settings in printer window: Color Handling:  Printer manages color.  Color management- Color Controls, 1.8 Gamma and choose Epson Standard it prints lighter, but with reddish cast and very little detail and this is the best setting I have used so far.
    Based on what I have read on line, I think the issue is mainly to do with what controls are set in the Photoshop Color Settings window and the Epson Printer preferences. I have screen images attached of these windows and would appreciate knowing what you recommend I enter for each choice.
    Also I am confused as to what ICM color management system to use with this printer and CS5:
    What is the best ICM to use with PS CS5 & the Epson 1400 printer? Should I use the same ICM for both?
    Do I embed the ICM I choose into the new files I create? 
    Do I view all files in the CS5 workspace in this default ICM?
    Do I set my monitor setting to the same ICM?
    If new file opens in CS5 workspace and it has a different embedded profile than my workspace, do I convert it?
    Do I set my printer, Monitor and PS CS5 color settings to the same ICM?
    Is using the same ICM for all devices what is called a consistent workflow?
    I appreciate any and all advice that can be sent my way on this complicated issue. Thank you in advance for your time and kind help.

    It may be possible to figure out by watching a Dr.Brown video on the subject of color printing. Adobe tv
    I hope this may help...............

  • File missing (file\BCD error code 0Xc0000034 help need for work!

    file missing (file\BCD  error code 0Xc0000034 help need for work!    what can i do?
    have an p 2000 notebook pc

     Hi bobkunkle, welcome to the HP Forums. I understand you cannot boot passed the error you are receiving.
    What is the model or product number of your notebook? What version of Windows is installed?
    Guide to finding your product number
    Which Windows operating system am I running?
    TwoPointOh
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • Help need for Outer Join Query Mysterious Query...

    I have two table parent tablea and child tableb
    Now
    tableb has field by name table_id,keyword_name,keyword_value
    tablea has field by name
    table_id,table_name
    I need a query which would retrieve union of this two set...(for table_name)
    1)all table_name having keyword_name='abc' and value=12
    2)all the table_name that does not have 'abc' as keyword in tableb.....
    Please let me know how it can be done....

    Ok then, try this.
    select
        a.table_name
    from
        tablea a, tableb b
    where
        a.table_id = b.table_id
        and b.keyword_name = 'abc'
        and b.value = 12
    union
    select
        c.table_name
    from
        tablea c
    where
        not exists (select 1 from tableb d
                    where d.table_id = c.table_id
                          and d.keyword_name = 'abc'
                   ) ;To get a faster answer and avoid wrong guesses, I always find it helpful to show sample data and sample output when asking a SQL question. For example:
    TableA -----------------
    table_id    table_name
      1           AAA
      2           BBB
      3           CCC
      4           DDD
      5           EEE
    TableB -----------------
    table_id    keyword_name   value
        1             abc       12
        1             def       23
        2             abc       13
        4             def       12
        5             abc       13
        5             def       12
    Desired output of query: -----------------
    AAA
    CCC
    DDD

Maybe you are looking for

  • How do I get my external hard-drive recognised by iTunes?

    I have 2 external hard drives, but now iTunes 12 will only recognize 1 of them. When I plug in the second for a back-up, it doesn't show up on the screen. This just happened with the latest upgrade to iTunes 12. I have a MacBook with OS X Version 10.

  • Problem in my phone suspension and billing

    Dear Verizon Wireless, Hi, I've been a loyal customer for Verizon, but I recently figured the website or the customer service are very hard to reach. Since I had a problem with my billing, I was trying to contact Verizon Wireless via live chat to loo

  • The keys on my keyboard do not work all the time. I have to strike a key more than once before it appears on the screen.

    I've changed batteries on my wireless keyboard with no help. It is a Wireless Keyboard 1000. I'm thinking it could be caused by an addon, but not sure which one.

  • Retrieving Part of a Result Set

    I am looking for the syntax to retrieve results back from the database in small blocks. Actually this is very similar to the way that this discussion forums bring back a fixed number of topics and has the page links to get the next list of topics. Th

  • SAP Platinum Consultant

    I have seen some people with title "Platinum consultant". When I asked this question I got very different answers. 1. What are the required qualifications(Certifications) and/or experience to be called as "platinum consultant" for SAP-Employees and n