Perform SQL COUNT from AS3

Hi there all,
Just working away as usual and I've encountered a problem with a flash app I'm making..
I can save and load variables from flash to the mySQL database, but when I load up the results one after the other I eventually run out of results to display, which throws an error !!
Is there a way I can perform an SQL COUNT from flash to determine the amount of results I have in the database and loop the viewer back to the first result ??
Many Thanks in advance for any help

This is how I am parsing and requesting the information.. I know it's in there somewhere I just can't get the variables, do I need to add them ? It's not making much sense to me at the moment, I'm sorry !! I need to add the variables to the request somehow.. so I can receive the info, no ?
var tab = "SQLtab";
var filesend = "path to php file";
var modesend = "post";
function variableTransaction(fichier, modesend, tab, var1, var2) {
     var URLload = new URLLoader();
     var URLrequest = new URLRequest(fichier);
     var variables:URLVariables = new URLVariables();
     variables.tab = tab;
     variables.var1 = var1;
     variables.var2 = var2;
     if (modesend == "post") {
          URLrequest.method = URLRequestMethod.POST;
     } else if ( modesend == "get") {
          URLrequest.method = URLRequestMethod.GET;
     if (var1 == false && var2 == false) {
          URLload.dataFormat = URLLoaderDataFormat.VARIABLES;
          URLrequest.data = variables;
          URLload.load(URLrequest);
          URLload.addEventListener(Event.COMPLETE, loadComplete, false, 0, true);
     } else {
          URLrequest.data = variables;
          URLload.load(URLrequest);
          var receiveObject = variableTransaction(filesend, modesend, tab, false, false);

Similar Messages

  • Get the connected users count from sql server using powershell

    Hi,
    I am working on SharePoint 2013,I am having SQL server 2012.
    I want to get the Connected Users count from  sql server using power shell.
    Can any one please let me know how to implement.
    Thanks in advance.
    Regards,
    Phani Kumar R

    Sorry Tom, I dont like to hear "There is no way" :-(
    There is always a way in computer to get what you need (at least it is good as Rule of thumb). I am not sure we will find it here (in a voluntary supporting forum).
    Now we (or better the architect of their system) should think of the way :-)
    Of course doing so in the forum, while we do know the system and only got a glimpse on what is needed, is not the best idea. I will point some issues which can be related to a solution. Those are not a solotions as it is but something we can use for a solution
    once something look in the right way.
    * A web connects counter is one of the easier thing to do. The basic idea is just to use the connect event and the disconnect event an adding 1 or removing 1 from the counter. This is best to do in the application using static variable as any way the second
    the application is down the counter can be go to hell as we know there is no one connect (there for a counter do not use database usually). Using a web dot-net (or asp 3) application this is done most of the time using the global.asa/global.asax file, which
    include the application and session events. for example using the method Session_Start
    protected void Session_Start(object sender, EventArgs e) {
    // Code that runs when a new session is started
    * IIS have a build-in loging system where we can log each and every request/response or only logins users. There is lot we can do with this log files including data mining. Using small bulk insert script we can use the SQL agent to insert those logs to the
    database and get the information we need.
    * any web developer i want to believe know about the Fiddler application which we use to monitor traffic. A proxy is not the only way to to monitor traffic (it is not good for our case as this is in the client side), there are several option in the server
    side.
    * SQL trigger on logon can be use to get information on who is loging on and can be logging only specific source (like our sharepoint IP or any sharepoint application). This information (what is the application which connect to the server can be retrive
    in several solution without using a trigger as well)
    *** (I'll be brief ... I'm getting bored... probably the reader feel the same)
    * using extended events and/or profiler we can monitor any connection and save the data or just remember it in shared (static) variable (this
    blog show how to do it by the way). Again we can monitor specific application or use any filter in order to get only the sharepoint users
    .... and i can continue for several days more :-) ...
    "If there is a willing, then there's a way"
    "If you can't do it, Then someone else probably can"
    "Never say never"
    I hope this help somehow :-)
    [Personal Site] [Blog] [Facebook]

  • Performance over DG from mysql to oracle very slow for inserts

    configured het services over gateway from oracle 11.2.0.4 to mysql 5.6
    Have a table I want to pull over into oracle.  1000 rows.
    On mysql : create view vw_mysql_t1 as select columns from my_mysql_table.    
    On Oracle:  create view vw_ora as select columns from  vw_mysql_t1@mysql_link
    On oracle: select * from vw_ora data returns data in 3-4 seconds. 
    however, try an insert to get the data over
         insert into a_table_on_oracle
             (select * from vw_ora)
    takes 11-12 minutes.     
    create table as or insert into same performance.  Tried just inserting 1 row  and same performance 11-12 minutes.  any ideas?

    cant seem to get the trace file to generate.  any ideas, I have the config as below, the gateway is working, I can select data no problem from table@dcv   , just performance is terrible
    logfile not in $ORACLE_HOME/hs/log
    or
    /tmp
    this is my tns
    dcv =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = tcp)(HOST = <IP of server>)(PORT = 1521))
        (CONNECT_DATA =
          (SID = dcv)
        (HS = OK)
    this is my init file
    # HS init parameters
    HS_FDS_CONNECT_INFO=dcv
    HS_FDS_TRACE_LEVEL=255
    HS_FDS_SHAREABLE_NAME = /usr/lib64/libmyodbc5a.so
    HS_RPC_FETCH_SIZE=50000               
    HS_ROWID_CACHE_SIZE=10000
    #HS_LONG_PIECE_TRANSFER_SIZE=1024
    HS_LONG_PIECE_TRANSFER_SIZE=65536
    HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P15    ## The Oracle RDBMS is using a Unicode characterset [ID 756186.1]
    HS_FDS_FETCH_ROWS=1                           ## This is select int datatype
    HS_FDS_SQLLEN_INTERPRETATION=32               ## This is to select NULL values via DB Link [ID 554409.1]
    # ODBC specific environment variables
    set ODBCINI=/etc/odbc.ini
    more /etc/odbc.ini
    [dcv]
    Driver       = /usr/lib64/libmyodbc5a.so
    SERVER       = <IP of mysql server>
    PORT         = 3306
    USER         = un
    Password     = pw
    Database     = dcv
    OPTION       = 3
    CHARSET      = latin1
    [ODBC]
    TRACE        = ON     # also tried 0 and 1 and DEBUG and USER
    TraceFile    = /tmp/odbc.trace
    10:11:19 SQL> select count(*) from "vw_t1"@dcv;
      COUNT(*)
         24794
    Elapsed: 00:00:00.23
    10:11:45 SQL>
    10:11:57 SQL>
    10:11:57 SQL>
    10:11:57 SQL>
    10:11:57 SQL>
    10:11:58 SQL> create table backup_data.delete_me as
    10:11:59   2  select   * from
    10:11:59   3        "vw_t1"@dcv;
    Table created.
    Elapsed: 00:09:47.07
    10:21:49 SQL>
    Theres around 130 columns, varchars, numerics and floats.  Is there a conversion going on that would take that long?

  • Getting counts from detail tables

    I have multiple record bock that displaye a list of cell ids and their attributes; each record also displays record counts of its 3 detail tables.
    Originally, the POST-QUERY trigger select the counts (3 detail tables) as part of the data block for each record (or cell id). There are over 16K records, so each record query issues 3 selects. The whole query toke over a minute. I was asked to improve the retrieval time.
    At first I thought perhaps I could put the 3 counts in 3 separate data blocks and issue one query each in a "select cell_id, count(*). . . group by cell_id" but scrolling would not synchronize with the other blocks. So I dropped that idea.
    Next, I added a program unit from which the WHEN-NEW-FORM-INSTANCE trigger calls after execute_query. It issues "select cell_id, count(*). . . group by cell_id" (one for each detail table) and fills the count columns in the original data block. However I need to set the block property Query All Records to YES so that the cell ids and attributes are filled first. That means that before the form comes up it has to retrieve all records. That saves me about 10-15 seconds od retrieval time and I lose the ability to quickly bring up the form.
    Then I looked at using dfferent Query Data Source Types. I don't think I could do one query with counts of detail tables. Besides, some items (attrinutes) of the cell are upate-able.
    Any ideas and suggestions will be appreciated.

    Yes. I suggested adding columns to the master tables and introduce stored triggers.
    Since the change is not trivial, according to management, they put in on hold.I'm not sure if you misunderstood my suggestion or were responding to a different post. The query I wrote was for counting the detail records on the fly rather than populating new columns. If you include the counting in your main query then you will probably not have a much slower query than if you don't show any counts at all. Scrolling through the block will be no slower than if you had no counts, because no extra processing needs to be done. (You'll still have to fetch the detail blocks for each row, so moving to the last record will still be slow - that's a bad indicator of the performance of a query.)
    For example, fetching the objects for each user takes 5 seconds. When I include the number of tables, indexes and constraints for each user within the query the time only goes up to just under 9.
    SQL> set autot trace stat
    SQL> set timing on
    SQL> SELECT
      2    owner,
      3    object_name,
      4    object_type
      5  FROM all_objects ao;
    39062 rows selected.
    Elapsed: 00:00:05.13
    Statistics
           4656  recursive calls
              0  db block gets
          85106  consistent gets
              0  physical reads
              0  redo size
        1469372  bytes sent via SQL*Net to client
          29021  bytes received via SQL*Net from client
           2606  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          39062  rows processed
    SQL> SELECT
      2    owner,
      3    object_name,
      4    object_type,
      5    (SELECT Count(*) FROM all_tables WHERE owner = ao.owner) count_tables,
      6    (SELECT Count(*) FROM all_indexes WHERE owner = ao.owner) count_indexes,
      7    (SELECT Count(*) FROM all_constraints WHERE owner = ao.owner) count_constraints
      8  FROM all_objects ao;
    39062 rows selected.
    Elapsed: 00:00:08.86
    Statistics
           4656  recursive calls
              0  db block gets
         270299  consistent gets
              0  physical reads
              0  redo size
        1684042  bytes sent via SQL*Net to client
          29021  bytes received via SQL*Net from client
           2606  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          39062  rows processed
    SQL> If you populate the counts in post-query then the process is similar to the block below. I tried to get a timing and stats for this but it took over 15 minutes so I shut it down.
    DECLARE
    ct NUMBER;
    ci NUMBER;
    cc NUMBER;
    BEGIN
      FOR ao IN (SELECT owner, object_name, object_type FROM all_objects)
      LOOP
        SELECT Count(*) INTO ct FROM all_tables WHERE owner = ao.owner;
        SELECT Count(*) INTO ci FROM all_indexes WHERE owner = ao.owner;
        SELECT Count(*) INTO cc FROM all_constraints WHERE owner = ao.owner;
      END LOOP;
    END;Creating a view on the query and writing the "instead of" triggers is hopefully a trivial enough operation that management won't get in the way. Then you'll be able to update the block.

  • Connect to MS-SQL Server from a Oracle 10g running under Solaris

    Hi,
    I have the following problem. I want to access a MS-SQL server from an Oracle database (10g Enterprise licence) that is running on Solaris.
    After googling a while, the following questions arise:
    - Is it correct that the Oracle Transparant Gateway for the SQL Server is not available on Solaris platforms (but only on Windows)?
    - Is it right, that the second possibility to solve this problem is to use an SQL-Server odbc driver for Solaris and access the SQL-Server over ODBC? And: Is this feature included in the Enterprise licence?
    - If yes, which driver is good and cheap ;-)?
    - Is there any other way to solve this problem?
    Thanks
    Aron
    Message was edited by:
    user583720

    I believe the Transparenet Gateway for SQL Server is available on Solaris. The problem is that you need a Unix based ODBC driver which you will also need to pay for.
    We had this same problem and decided to run a windows based Heterogeneous Services gateway and routed through it instead of using the SQL Server transparent gateway. The Heterogenous severives gateway is NOT an add on product (as is Transparent Gateway). The drawback would be performance as I would expect the native MS SQL transparent gateway to perform better, but in our case it worked acceptably.

  • Select Count(*) from Sample_table - how to get the count using JDBC?

    Hi All,
    It would be glad if anyone could help me with this. The problem is that I have to get the 'count' of records selected from a arbitrary table say, 'sample_table'. Is that possible to form the SQL in JDBC as
    Select Count(*) from Sample_table
    and get the value of the count? If yes, how?
    Thanks in advance
    Prabz

    stmt = con.createStatement();
    ResultSet recordcnt_rs = stmt.executeQuery("Select Count (*) as record_ctr From Sample_table");
    recordcnt_rs.next();     
    record_ctr = recordcnt_rs.getInt("record_ctr");
    hope this helps.

  • IPad unread email count doesn't tally with Microsoft Exchange 2007 email count from OWA.

    I discovered that when we first setup the iPad to sync email from Microsoft Exchange 2007 server via ActiveSync, the total number of unread email count tally with the count from OWA. After a few days, the unread email count will be out of sync. The settings for iPad "Mail days to syn": No limit. Mail to show: 1000. iPad iOS: 5.1.1
    We performed the following:
    1.     Compare email by email to verify which are the read email from OWA doesn't sync to iPad. We discovered that some emails read from OWA doesn't sync with iPad even performed forced update. However, if we delete that read email from OWA, it will delete (unread) from iPad immediately after sync.
    2.     Email recall message for successful recalled displayed in OWA but not on iPad.
    3.     Calendar invite message forward as email displayed in OWA but not in iPad.
    Is there a bug for Microsoft Exchange 2007 or there is limitation for iPad?
    Any kind expert can advice?
    Thanks.

    Can you do setup an unread mail folder that shows all unread mail regardless of what folder it really is in on the iPhone mail program somehow?
    No.
    If not, can this be submitted as an enhancement as it makes email use very cumbersome.
    Yes. You can submit feedback to Apple: http://www.apple.com/feedback/iphone.html.

  • SQL Injection from PL/SQL function.

    WE have some issues with a third party application which has vulnerabilities to SQL Injection, we have delivered a proof of concept to the developers demonstrating that it is possible to return additional (unrestricted) results to the front end, we have also found the following function in the back end. Assuming that its possible to call this function (which it is) and we can pass in whatever we want and that the user has exp_full_database and imp_full_database roles granted is there anything destructive possible with the following function?
    FUNCTION row_count (tab_name VARCHAR2) RETURN INTEGER AS
    rows INTEGER;
    BEGIN
    EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || tab_name INTO rows;
    RETURN rows;
    END;
    version 11.2.0.3, linux x86

    Simple example.
    SQL> --// table to hack in production - we are going to nuke it
    SQL> create table production_table1(
      2          some_data       number
      3  );
    Table created.
    SQL> --// production code typically executes with production rights (authid definer)
    SQL> create or replace function RowCount( tabName varchar2 ) return integer authid definer is
      2  --// code executes with the privs of the owner of the code
      3          cnt     integer;
      4  begin
      5          execute immediate 'SELECT COUNT(*) FROM ' || tabName into cnt;
      6          return( cnt );
      7  end;
      8  /
    Function created.
    SQL> --// expected use of production code
    SQL> var i number
    SQL> exec :i := RowCount( 'EMP' );
    PL/SQL procedure successfully completed.
    SQL> print i
             I
            14
    SQL>
    SQL> --// create the following in any schema that I, as hacker, have access to and the
    SQL> --// right to create a procedure - and using "access/security escalation", I'm going
    SQL> --// to get production code to run my code with production rights
    SQL>
    SQL> create or replace function InjectCode return integer authid current_user is
      2  --// code executes with the privs of the caller of the code
      3          pragma autonomous_transaction;
      4  begin
      5          execute immediate 'drop table PRODUCTION_TABLE1 purge';
      6          return( 0 );
      7  end;
      8  /
    Function created.
    SQL>
    SQL> --// production table is there
    SQL> select object_type, object_name from user_objects where object_name = 'PRODUCTION_TABLE1';
    OBJECT_TYPE                    OBJECT_NAME
    TABLE                          PRODUCTION_TABLE1
    SQL>
    SQL> --// inject my code into production code
    SQL> exec :i := RowCount( 'EMP where InjectCode() = 0' );
    PL/SQL procedure successfully completed.
    SQL> print :i
             I
            14
    SQL> --// production table is nuked
    SQL> select object_type, object_name from user_objects where object_name = 'PRODUCTION_TABLE1';
    no rows selected
    SQL>

  • Query related to excution and performance of count in select statement

    Hi,
    What are the difference between
    select count(1) from table
    and
    select count(*) from table

    Thanks for the reply.I searched lots of thread for the same and found that it's same (excution wise and performance wise).
    But in few thread i found that someone is saying
    "At the time of exceution Count(1) will conevrted internally to count(*) " --- is it correct
    "is there any soecial significance of using count(42)" ?
    Tx,
    Anit

  • Select count(*) from table in oracle 11g with direct path read takes time

    select count(*) from table takes long time, even more than couple of hours..
    direct path read is the wait event which is almost is at 99%..
    can u someone provide some info on this.. on solution.. thankx

    knowledgespring wrote:
    table has millions of records... 130 millions..
    select count(*) from BIG_SIZE_TABLE; --- executed in sql plus command prompt.
    Rows     Execution Plan
    0  SELECT STATEMENT   MODE: ALL_ROWS
    0   SORT (AGGREGATE)
    0    TABLE ACCESS   MODE: ANALYZED (FULL) OF 'BIG_SIZE_TABLE' (TABLE)
    Elapsed times include waiting on following events:
    Event waited on                             Times   Max. Wait  Total Waited
    ----------------------------------------   Waited  ----------  ------------
    SQL*Net message to client                       1        0.00          0.00
    enq: KO - fast object checkpoint                1        0.01          0.01
    Disk file operations I/O                       18        0.00          0.00
    direct path read                            58921        0.34        418.54direct path read time waited is : 58921 total time waited: 418.54
    That 418 seconds - not the hours you reported earlier. Is it possible that your connection to the database broke ?
    On a typical system, by the way, you can usually turn one direct read for tablescan into 1MB, so your scan seems to have covered about 59 GB, which seems to be in the right sort of ballpark for 130M rows.
    we have another query and when we test the query execution using v$sql, is_bind_sensitive =N, how to make is_bind_sensitive=Y all the time.. There is a hint /*+ bind_aware */ - I'd have to check whether or not it's documented at present. It might help.
    I would be interested in hearing why you think the hint should be bind sensitive when the optimizer doesn't.
    Regards
    Jonathan Lewis

  • Connecting to SQL 2005 from Oracle error

    I have an Oracle Database and SQL Database on the same server and wants to use odbc to connect to the SQL 2005 database and query tables of my choice.
    I did configured the ODBC correctly and called the DSN TSH_ARCHIVE. I have tested it and it works great. But each time I run the following query I get error:
    SQL> select count(*) from BALANCES_HS@tse_archive;
    select count(*) from BALANCES_HS@tse_archive
    ERROR at line 1:
    ORA-12154: TNS:could not resolve the connect identifier specified
    Any suggestion and help will be greatly appreciated.
    Edited by: azaza on Jan 28, 2010 6:32 AM

    Hi,
    Thanks for the files.
    There are some problems with the configuration.
    listener.ora -
    LISTENERTSE_ARCHIVE =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST = xxxxx.ita.doc.gov)(PORT=1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    SID_LIST_LISTENER=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=TSE_ARCHIVE)
    (ORACLE_HOME=J:\app\product\11.1.0\db_2)
    (PROGRAM=hsodbc)
    (SID_DESC=
    (SID_NAME=tpisdb06)
    (ORACLE_HOME=J:\app\product\11.1.0\db_2)
    This should be -
    LISTENERTSE_ARCHIVE =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST = xxxxx.ita.doc.gov)(PORT=1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    SID_LIST_LISTENERTSE_ARCHIVE =
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=TSE_ARCHIVE)
    (ORACLE_HOME=J:\app\product\11.1.0\db_2)
    (PROGRAM=dg4odbc)
    (SID_DESC=
    (SID_NAME=tpisdb06)
    (ORACLE_HOME=J:\app\product\11.1.0\db_2)
    The SID_LIST_LISTENER needs to match the actual listener name and the program for 11g DG4ODBC is called dg4odbc and not hsodbc.
    tnsnames.ora -
    TSE_ARCHIVE =
    (DESCRIPTION=
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = TSE_ARCHIVE)(PORT=1521))
    (CONNECT_DATA =
    (SERVICE_NAME = TSE_ARCHIVE)
    (HS=OK)
    The HOST name - TSE_ARCHIVE does not match the HOST in the listener, so it should be -
    TSE_ARCHIVE =
    (DESCRIPTION=
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xxxxx.ita.doc.gov)(PORT=1521))
    (CONNECT_DATA =
    (SERVICE_NAME = TSE_ARCHIVE)
    (HS=OK)
    I've changed the actual name to xxxxx so replace that with the name in the original file.
    Change the files, stop and start the listener then try again.
    If you still have an ora-12154 error then send the output from the following SQL -
    select db_link, host from user_db_links; <=== as the user getting the error
    and
    select db_link, host from dba_db_links; <===== as a DBA user
    Regards,
    Mike

  • Collumn Count from Database Table

    Hello,
    I wan't to get a Collumn Count from a Table in my Database, but I don't know how to do that.
    I use a ResultSet, and if i press ctrl + spacebar in NetBeans I get a list of all kind of things I can get out of the result set but I can't find CollumnCount anywhere.
    I thought I could use a try catch statement like this:
    try
    for(i=1; i<999; i++)
    myResultSet().getString(i);
    catch( Exception e )
    AantalKolommen = i--;
    But everytime I get an Exception over Invalid Crursor State and "i" keeps standing on 1.
    Does anybody know a way to find out how to get a collumns count????

    To retrieve the columns for a table use
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMetaData.html#getColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)
    To get the columns for your result set use
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSetMetaData.html#getColumnCount()
    To get the ResultSetMetaData use
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html#getMetaData()

  • Select Count(*) from... returns zero, select * from... returns 4000 recs?

    Hi,
    I have an odd situation where "select count(*) from my_view where some_clause" returns 0, but the exact same query fetching the data (ie "select * from my_view where some_clause") works fine and fetches, correctly, 4000+ records.
    I have tried dropping and recreating the view, and collecting DB stats again, but the problem persists.
    I had a look at the explain plans and they are very different, but both the SQL statements work fine on a copy of the database taken with impdp.
    Does anyone have any suggestions on what might be going on here ?
    Any help would be appreciated, I've run out of ideas !
    Dave
    Edited by: user10281551 on 18-Sep-2008 00:43
    Edited by: user10281551 on 18-Sep-2008 00:44

    Maybe it's the bug that a function based index is present and gets incorrectly used in the select count(*) statement?
    If that's not the case, then please show us more details, like the statement and both execution plans.
    Regards,
    Rob.

  • "select count(*) from dba_jobs_running" takes 5 minutes to return

    Hi,
    I login as sys or system from sql*plus to run query "select count(*) from dba_jobs_running". This query takes about 5 minutes to run.
    Querying other DBA_* views returns instantly, only this dba_jobs_running view is troubling.
    I have 11 records in dba_jobs, and 18 records in v$lock as usual.
    No error or warning in logfile, no trace file.
    What's possibly wrong with the server?
    Thanks,
    Harry

    Hi,
    The following are the exact statements I used to create the trace file:
    alter session set timed_statistics=true;
    alter session set max_dump_file_size=unlimited;
    alter session set events '10046 trace name context forever, level 12';
    select count(*) from dba_jobs_running;
    exit;
    The content of the trace file is attached at the end.
    If it is CPU bound, I have no activity on the db host. I am solely using it to analyze this problem.
    load averages: 0.02, 0.02, 0.07 22:16:38
    48 processes: 47 sleeping, 1 on cpu
    CPU states: 98.4% idle, 1.6% user, 0.0% kernel, 0.0% iowait, 0.0% swap
    Memory: 1792M real, 983M free, 517M swap in use, 2937M swap free
    PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
    655 oracle 1 59 0 0K 0K sleep 1:14 0.32% oracle
    865 oracle 1 59 0 2072K 1184K cpu 0:00 0.14% top
    667 oracle 1 59 0 0K 0K sleep 0:13 0.08% oracle
    663 oracle 1 59 0 0K 0K sleep 0:27 0.07% oracle
    665 oracle 1 59 0 0K 0K sleep 0:15 0.02% oracle
    671 oracle 1 59 0 0K 0K sleep 0:00 0.02% oracle
    645 oracle 18 59 0 0K 0K sleep 0:23 0.01% oracle
    657 oracle 1 59 0 0K 0K sleep 0:14 0.00% oracle
    649 oracle 1 59 0 0K 0K sleep 0:02 0.00% oracle
    659 oracle 1 59 0 0K 0K sleep 0:01 0.00% oracle
    251 root 20 59 0 3256K 2512K sleep 0:00 0.00% nscd
    70 root 5 59 0 2864K 2096K sleep 0:00 0.00% picld
    224 root 3 59 0 3912K 2008K sleep 0:00 0.00% automountd
    271 root 1 59 0 4408K 1896K sleep 0:00 0.00% sendmail
    588 oracle 1 59 0 2600K 1864K sleep 0:00 0.00% bash
    Any help is greatly appreciated.
    <-- TRACE FILE CONTENT -->
    *** 2006-11-21 21:34:54.413
    *** SESSION ID:(21.832) 2006-11-21 21:34:54.412
    APPNAME mod='[email protected] (TNS V1-V3)' mh=0 act='' ah=0
    =====================
    PARSING IN CURSOR #1 len=69 dep=0 uid=0 oct=42 lid=0 tim=107123626140 hv=2004533713 ad='97219d80'
    alter session set events '10046 trace name context forever, level 12'
    END OF STMT
    EXEC #1:c=0,e=346,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=4,tim=107123625473
    WAIT #1: nam='SQL*Net message to client' ela= 11 p1=1650815232 p2=1 p3=0
    WAIT #1: nam='SQL*Net message from client' ela= 6476024 p1=1650815232 p2=1 p3=0
    =====================
    PARSING IN CURSOR #1 len=37 dep=0 uid=0 oct=3 lid=0 tim=107130104260 hv=2246554324 ad='97c21958'
    select count(*) from dba_jobs_running
    END OF STMT
    PARSE #1:c=0,e=548,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=107130104237
    BINDS #1:
    EXEC #1:c=0,e=1412,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=107130106034
    WAIT #1: nam='SQL*Net message to client' ela= 12 p1=1650815232 p2=1 p3=0
    *** 2006-11-21 21:40:53.931
    FETCH #1:c=350760000,e=344612113,p=0,cr=2,cu=16652,mis=0,r=1,dep=0,og=4,tim=107474718456
    WAIT #1: nam='SQL*Net message from client' ela= 1936 p1=1650815232 p2=1 p3=0
    FETCH #1:c=0,e=6,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,tim=107474721309
    WAIT #1: nam='SQL*Net message to client' ela= 8 p1=1650815232 p2=1 p3=0
    *** 2006-11-21 21:56:30.972
    WAIT #1: nam='SQL*Net message from client' ela= 915075702 p1=1650815232 p2=1 p3=0
    XCTEND rlbk=0, rd_only=1
    STAT #1 id=1 cnt=1 pid=0 pos=1 obj=0 op='SORT AGGREGATE (cr=2 r=0 w=0 time=100535896 us)'
    STAT #1 id=2 cnt=0 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=2 r=0 w=0 time=100535876 us)'
    STAT #1 id=3 cnt=5550 pid=2 pos=1 obj=0 op='MERGE JOIN CARTESIAN (cr=2 r=0 w=0 time=128639 us)'
    STAT #1 id=4 cnt=10 pid=3 pos=1 obj=0 op='NESTED LOOPS OUTER (cr=2 r=0 w=0 time=5839 us)'
    STAT #1 id=5 cnt=10 pid=4 pos=1 obj=69 op='FIXED TABLE FULL X$KSQRS (cr=0 r=0 w=0 time=4790 us)'
    STAT #1 id=6 cnt=10 pid=4 pos=2 obj=202 op='INDEX UNIQUE SCAN OBJ#(202) (cr=2 r=0 w=0 time=561 us)'
    STAT #1 id=7 cnt=5550 pid=3 pos=2 obj=0 op='BUFFER SORT (cr=0 r=0 w=0 time=90039 us)'
    STAT #1 id=8 cnt=555 pid=7 pos=1 obj=16 op='FIXED TABLE FULL X$KSUSE (cr=0 r=0 w=0 time=1277 us)'
    STAT #1 id=9 cnt=0 pid=2 pos=2 obj=0 op='VIEW (cr=0 r=0 w=0 time=344148954 us)'
    STAT #1 id=10 cnt=105477 pid=9 pos=1 obj=0 op='UNION-ALL (cr=0 r=0 w=0 time=343814331 us)'
    STAT #1 id=11 cnt=105476 pid=10 pos=1 obj=0 op='VIEW (cr=0 r=0 w=0 time=203487737 us)'
    STAT #1 id=12 cnt=105476 pid=11 pos=1 obj=0 op='UNION-ALL (cr=0 r=0 w=0 time=202961626 us)'
    STAT #1 id=13 cnt=0 pid=12 pos=1 obj=272 op='FIXED TABLE FULL X$KDNSSF (cr=0 r=0 w=0 time=13633786 us)'
    STAT #1 id=14 cnt=105476 pid=12 pos=2 obj=72 op='FIXED TABLE FULL X$KSQEQ (cr=0 r=0 w=0 time=188317145 us)'
    STAT #1 id=15 cnt=0 pid=10 pos=2 obj=253 op='FIXED TABLE FULL X$KTADM (cr=0 r=0 w=0 time=76301426 us)'
    STAT #1 id=16 cnt=1 pid=10 pos=3 obj=254 op='FIXED TABLE FULL X$KTCXB (cr=0 r=0 w=0 time=62693462 us)'
    STAT #1 id=16 cnt=1 pid=10 pos=3 obj=254 op='FIXED TABLE FULL X$KTCXB (cr=0 r=0 w=0 time=62693462 us)'
    <---- END of TRACE FILE -->

  • 'select count(*) from x' returns 5460 rows and 'Select * from x' returns 0 rows

    As you can see in the next lines something is wrong in my Oracle (8.0.6 on Win NT 4.0 sp 6a) :
    Oracle8 Enterprise Edition Release 8.0.6.0.0 - Production
    With the Partitioning option
    PL/SQL Release 8.0.6.0.0 - Production
    SQLWKS> SELECT * FROM V_TERRA_TE;
    PERIOD_DATE PERIOD_TIME TERRARCV TERRASND TERCV TESND
    0 rows selected.
    SQLWKS> SELECT COUNT(*) FROM V_TERRA_TE;
    COUNT(*)
    5460
    1 row selected.
    V_TERRA_TE is a complex join of 5 Tables :
    CREATE OR REPLACE VIEW "ACTUATE".V_TERRA_TE AS Select to_date(to_char(p1.period_date,'YYYYMMDD'),'YYYYMMDD') "PERIOD_DATE",
    to_date(to_char(p1.period_time,'HH24:MI'),'HH24:MI') "PERIOD_TIME",
    to_number(p1.caudalrcv + ((p3.caudalrcv + p4.caudalrcv)*(confterrate.conexadslterra/confterrate.conexadsltotal))) "TERRARCV",
    to_number(p1.caudalsnd + ((p3.caudalsnd + p4.caudalsnd)*(confterrate.conexadslterra/confterrate.conexadsltotal))) "TERRASND",
    to_number((p2.caudalrcv * confterrate.pctinfonegocio) + ((p3.caudalrcv + p4.caudalrcv)*(confterrate.conexadslte/confterrate.conexadsltotal)))"TERCV",
    to_number((p2.caudalsnd * confterrate.pctinfonegocio) + ((p3.caudalsnd + p4.caudalsnd)*(confterrate.conexadslte/confterrate.conexadsltotal)))"TESND"
    from p1,p2,p3,p4,confterrate
    where (p1.period_date=p2.period_date)and
    (p1.period_date=p3.period_date)and
    (p1.period_date=p4.period_date)and
    (p1.period_time=p3.period_time)and
    (p1.period_time=p4.period_time)and
    (p1.period_time=p2.period_time)and
    to_char(p1.period_date,'MMYYYY')=to_char(confterrate.period_datetime,'MMYYYY');
    I think that some not reported error happens in the select * with some temporary space or similar but only the message '0 rows selected' is displayed (instead the real error)
    Could somebody help me ?
    Thanks in advance
    Francisco

    Forcing the Join/sort to be made on Disk (not on memory) the problem not happens. This demostrate that ORACLE has a VERY IMPORTANT BUG : It returns 0 rows wich is false.
    To force it to work on disk i use this parameters :
    alter session set sort_area_size=0
    alter session set hash_join_enabled=false
    Note : probably is not the best combination or use of parameters, but using it the query works as espected.

Maybe you are looking for

  • Cloud computing in Oracle

    I m SQL / PLSQL developer Are thr any courses in oracle cloud which can be helpful to me ? How we can relate SQL / PLSQL and cloud computing ?

  • My macbook that wont turn back on after I open the lid

    Well my macbook is very fast and works great, *+when it turns back on+.* I leave it on most of the time and close it, plugged into a power cord, when i am done using it. I am not putting it to sleep or turning it off, just closing the lid. When I ope

  • Nspluginwrapper-flash refuses to work

    Hi, some upgrade (don't remember if it was firefox, linux32 or nspluginwrapper) broke nspluginwrapper-flash functionality for me (in firefox). Since then, I have tried numerous things suggested in numerous forums, yet neither nspluginwrapper-flash no

  • ScriptListener in CS3. Can't turn it off

    I believe I've followed the script guides on this and can not shut it off. I have no scriptlistener as such in Automate I even renamed the file in Utilities Yet everytime I operate PS CS3 I get a big log file

  • Flash does not install, flipping me off!!!

    i need flash to play games and see certain programs (game example: shell shock live) i cannot install. always crashes in all installations. i got easy media player which i thought was flash. i kept it cause it solved one of my technical problems. i a