I am thinking through a problem, if I get a table, and the data in it keep growing, thousand, million, billion ....
One day, I think even a simple query it will need several seconds to run.
So is there any means which we can use to control the time within 1 second or any reasonable time ?
...
Suppose master_table contains many records and both the "id" field of the master_table, tableA,tableB,tableC and tableD are the same in the business sense.
For the 2 select statements shown belows ,
Will they both return the same result set?
Which one will have better performance ?
I think if both tableA_tmp ,tableB_tmp,tableC_tmp ...
I need to find using PL/SQL if a specific sequence named e.g. MY_SEQ exits. If the sequence exists then drop it and create a new, or else to just create a new sequence.
E.G. (pseudocode)
IF EXISTS(MY_SEQ) THEN
BEGIN
DROP SEQUENCE MY_SEQ;
CREATE SEQUENCE MY_SEQ...
END;
ELSE
BEGIN
CREATE SEQUENCE MY_SEQ;
END;
...
Hi,
When I execute sql query SELECT * FROM TABLE (TEST.getDevices()) in SqlDeveloper I've got about 200 rows, but when I try to execute it in java:
//cut here
String query = "SELECT * FROM TABLE (TEST.getDevices())";
PreparedStatement stmt = null;
ResultSet rset = null;
try {
stmt = oracleConnection.prepareStatement(query);
...
Hi,
I have a owner A and owner B in the DB. Each of them has its own schemas, etc. If I grant rights to an user from B (so he has e.g. access to some view under A), is there any way how to display privs like this? I mean, one user has some rights under each DB owner and its schematas.
The reason for that is that I would need to be sure t...
I'm trying to create a link between oracle 10g and ms access 2007 but I don't know how to set parameters in my tnsnames.ora file to access my MS Access db.
I've created new Data Source in ODBC Data Source Administrator with Microsoft Access Driver and selected my access db (.mdb).
In the MS Access I can link between tables and I see da...
I have a requirement to insert 12600 data in one table. The data is in doc file i need to upload all the data in particular table at one shot.
please give me a suggestion to upload the data.
Thanks in advance.
...
How can I select the maximum row from a table? What does maximum mean -- well my table has two timestamp columns, TIME1 and TIME2. The maximum column is the one with the latest value for TIME1. If that is not a unique row, then the maximum is the one within those rows with the latest value for TIME2.
This is on Oracle if that matters...
Hello!
We have a lot of our business logic in an oracle database. So we use a lot of PL/SQL code. We build, test, and debug PL/SQL packages, procedures, triggers, and functions.
Our current tool is the PL/SQL Developer (http://www.allroundautomations.com/).
What are your tools for PL/SQL coding and why do you prefer it to the PL/SQL De...
Hi everybody.
when using oracle forms to generate md5 hash, i get result that is different from the result given by tomcat.
when using tomcat digest, i get:
C:\apache-tomcat-6.0.26\bin>digest -a md5 mypass
mypass:a029d0df84eb5549c641e04a9ef389e5
while using oracle forms, i get:
a029d0dfbfeb5549c641e04abff3bfe5
this is the code...
I am trying to connect to an Oracle Database using nHibernate. I can connect using the .Net driver:
<property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
However I would prefer to use the OracleDataClientDriver that ships with Oracle (or nHibernate? I forget). Anyway I was using the instructions ...
What is the best way to dynamically set the 'order by' column name and direction from parameters passed in to a plsql procedure?
...
I came across a question recently that was for "Generating primary key in a clustered environment of 5 App-Servers - [OAS Version 10] without using database".
Usually we generate PK by a DB sequence, or storing the values in a database table and then using a SP to generate the new PK value...However current requirement is to generate pr...
We have customers who are upgrading from one database version to another (Oracle 9i to Oracle 10g or 11g to be specific). In one case, a customer exported the old database and imported it into the new one, but for some reason the indexes and constraints didn't get created. They may have done this on purpose to speed up the import process...
Given databases x, y with matching schemas:
//for all entries in x.MY_TABLE
// if PRIMARY_KEY of entry exists in y.MY_TABLE
// if {data of entry in x} doesn't match {data of matching entry in y}
// print PRIMARY_KEY
// else
// print PRIMARY_KEY
Assume that the table is a simple system...
Hello,
I have a table (PAT_PROCEDURES) with three columns: patient_id, procedure_id, procedure_date, and token_id that stores records about patients and procedures they've undergone as well as the procedure's date; token ID is a special numeric identifier.
I also have another table (PAT_TOKENS) with three columns patient_id and token_...
Is the following workflow possible with Informatica Powercenter?
AS400 -> Xml(in memory) -> Oracle 10g stored procedure (pass xml as param)
Specifically, I need to take a result set eg. 100 rows. Convert those rows into a single xml document as a string in memory and then pass that as a parameter to an Oracle stored procedure that is ...
I have been thinking of using AIR, but without the ability to easily connect to Oracle, it's not as likely I'll us it. I am in need of a way to push a simple alert to users on an enterprise system. Currently they want something in a browser window, but I don't think it is the best option, plus it looks terrible. AIR looks great with the ...
SELECT instmax
FROM
(SELECT instmax ,rownum r
FROM
( SELECT instmax FROM pswlinstmax ORDER BY instmax DESC NULLS LAST
)
WHERE r = 2
);
After execution it's giving this error:
ORA-00904: "R": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Error at Line: 39 Column: 8
why it's giving th...
>SELECT instmax
FROM
(SELECT instmax,
rownum r
FROM
( SELECT * FROM pswlinstmax ORDER BY instmax DESC NULLS LAST
)
)
WHERE r = 2;
INSTMAX
-------
1049
>SELECT instmax
FROM
(SELECT instmax,
rownum
FROM
(SELECT * FROM pswlinstmax ORDER BY instmax DESC
)
)
WHERE...