Tunning sql sub query for better performance
I have been given the task to tune this query for better execution as presently it take a very long time execute i will appreciate if someone can help.
Thank you.
SELECT a.fid_trx_no, a.fid_seq_no,a.bcc_customer_account,
a.bcc_msid,a.fid_trx_date,a.fid_trx_type,
a.fid_trx_initial_amount,a.fid_trx_fidodollar_amount
FROM
SPOT.SPOT_FIDODOLLAR_TRX a
WHERE
a.fid_trx_status = 'PE' AND a.fid_seq_no =
(SELECT MAX(c.fid_seq_no) FROM SPOT.SPOT_FIDODOLLAR_TRX c WHERE c.fid_trx_no = a.fid_trx_no) AND
a.FID_TRX_DATE <
(SELECT MAX(b.FID_TRX_DATE) FROM SPOT.SPOT_FIDODOLLAR_TRX b wHERE
b.bcc_customer_account = a.bcc_customer_account AND fid_trx_type IN
(SELECT par_code FROM SPOT.spot_parameter where par_value=:vAccountType AND par_type='FC')
)
Rob...
so many times you post this link.. i think that Oracle should put this link in an obvious place....!!!
Greetings,
Sim
Similar Messages
-
Please help to modifiy this query for better performance
Please help to rewrite this query for better performance. This is taking long time to execute.
Table t_t_bil_bil_cycle_change contains 1200000 rows and table t_acctnumberTab countains 200000 rows.
I have created index on ACCOUNT_ID
Query is shown below
update rbabu.t_t_bil_bil_cycle_change a
set account_number =
( select distinct b.account_number
from rbabu.t_acctnumberTab b
where a.account_id = b.account_id
Table structure is shown below
SQL> DESC t_acctnumberTab;
Name Type Nullable Default Comments
ACCOUNT_ID NUMBER(10)
ACCOUNT_NUMBER VARCHAR2(24)
SQL> DESC t_t_bil_bil_cycle_change;
Name Type Nullable Default Comments
ACCOUNT_ID NUMBER(10)
ACCOUNT_NUMBER VARCHAR2(24) YIshan's solution is good. I would avoid updating rows which already have the right value - it's a waste of time.
You should have a UNIQUE or PRIMARY KEY constraint on t_acctnumberTab.account_id
merge rbabu.t_t_bil_bil_cycle_change a
using
( select distinct account_number, account_id
from rbabu.t_acctnumberTab
) t
on ( a.account_id = b.account_id
and decode(a.account_number, b.account_number, 0, 1) = 1
when matched then
update set a.account_number = b.account_number -
How can we rewrite this query for better performance
Hi All,
The below query is taking more time to run. Any ideas how to improve the performance by rewriting the query using NOT EXITS or any other way...
Help Appreciated.
/* Formatted on 2012/04/25 18:00 (Formatter Plus v4.8.8) */
SELECT vendor_id
FROM po_vendors
WHERE end_date_active IS NULL
AND enabled_flag = 'Y'
and vendor_id NOT IN ( /* Formatted on 2012/04/25 18:25 (Formatter Plus v4.8.8) */
SELECT vendor_id
FROM po_headers_all
WHERE TO_DATE (creation_date) BETWEEN TO_DATE (SYSDATE - 365)
AND TO_DATE (SYSDATE))
ThanksTry this one :
This will help you for partial fetching of data
SELECT /*+ first_rows(50) no_cpu_costing */
vendor_id
FROM po_vendors
WHERE end_date_active IS NULL
AND enabled_flag = 'Y'
AND vendor_id NOT IN (
SELECT vendor_id
FROM po_headers_all
WHERE TO_DATE (creation_date) BETWEEN TO_DATE (SYSDATE - 365)
AND TO_DATE (SYSDATE))
overall your query is also fine, because, the in this query the subquery always contain less data compare to main query. -
Scale out SSAS server for better performance
HI
i have a sharepoint farm
running performance point service in a server where ANaylysis srver,reporting server installed
and we have anyalysis server dbs and cubes
and a wfe server where secure store service running
we have
1) application server + domain controller
2) two wfes
1) sql server sharepoint
1) SSAS server ( analysis server dbs+ reporting server)
here how i scaled out my SSAS server for better performance
adilJust trying to get a definitive answer to the question of can we use a Shared VHDX in a SOFS Cluster which will be used to store VHDX files?
We have a 2012 R2 RDS Solution and store the User Profile Disks (UPD) on a SOFS Cluster that uses "traditional" storage from a SAN. We are planning on creating a new SOFS Cluster and wondered if we can use a shared VHDX instead of CSV as the storage that
will then be used to store the UPDs (one VHDX file per user).
Cheers for now
Russell
Sure you can do it. See:
Deploy a Guest Cluster Using a Shared Virtual Hard Disk
http://technet.microsoft.com/en-us/library/dn265980.aspx
Scenario 2: Hyper-V failover cluster using file-based storage in a separate Scale-Out File Server
This scenario uses Server Message Block (SMB) file-based storage as the location of the shared .vhdx files. You must deploy a Scale-Out File Server and create an SMB file share as the storage location. You also need a separate Hyper-V failover cluster.
The following table describes the physical host prerequisites.
Cluster Type
Requirements
Scale-Out File Server
At least two servers that are running Windows Server 2012 R2.
The servers must be members of the same Active Directory domain.
The servers must meet the requirements for failover clustering.
For more information, see Failover Clustering Hardware Requirements and Storage Options and Validate
Hardware for a Failover Cluster.
The servers must have access to block-level storage, which you can add as shared storage to the physical cluster. This storage can be iSCSI, Fibre Channel, SAS, or clustered storage spaces that use a set of shared SAS JBOD enclosures.
StarWind VSAN [Virtual SAN] clusters Hyper-V without SAS, Fibre Channel, SMB 3.0 or iSCSI, uses Ethernet to mirror internally mounted SATA disks between hosts. -
What is the best way to replace the Inline Views for better performance ?
Hi,
I am using Oracle 9i ,
What is the best way to replace the Inline Views for better performance. I see there are lot of performance lacking with Inline views in my queries.
Please suggest.
RajWITH plus /*+ MATERIALIZE */ hint can do good to you.
see below the test case.
SQL> create table hx_my_tbl as select level id, 'karthick' name from dual connect by level <= 5
2 /
Table created.
SQL> insert into hx_my_tbl select level id, 'vimal' name from dual connect by level <= 5
2 /
5 rows created.
SQL> create index hx_my_tbl_idx on hx_my_tbl(id)
2 /
Index created.
SQL> commit;
Commit complete.
SQL> exec dbms_stats.gather_table_stats(user,'hx_my_tbl',cascade=>true)
PL/SQL procedure successfully completed.
Now this a normal inline view
SQL> select a.id, b.id, a.name, b.name
2 from (select id, name from hx_my_tbl where id = 1) a,
3 (select id, name from hx_my_tbl where id = 1) b
4 where a.id = b.id
5 and a.name <> b.name
6 /
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=7 Card=2 Bytes=48)
1 0 HASH JOIN (Cost=7 Card=2 Bytes=48)
2 1 TABLE ACCESS (BY INDEX ROWID) OF 'HX_MY_TBL' (TABLE) (Cost=3 Card=2 Bytes=24)
3 2 INDEX (RANGE SCAN) OF 'HX_MY_TBL_IDX' (INDEX) (Cost=1 Card=2)
4 1 TABLE ACCESS (BY INDEX ROWID) OF 'HX_MY_TBL' (TABLE) (Cost=3 Card=2 Bytes=24)
5 4 INDEX (RANGE SCAN) OF 'HX_MY_TBL_IDX' (INDEX) (Cost=1 Card=2)
Now i use the with with the materialize hint
SQL> with my_view as (select /*+ MATERIALIZE */ id, name from hx_my_tbl where id = 1)
2 select a.id, b.id, a.name, b.name
3 from my_view a,
4 my_view b
5 where a.id = b.id
6 and a.name <> b.name
7 /
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=8 Card=1 Bytes=46)
1 0 TEMP TABLE TRANSFORMATION
2 1 LOAD AS SELECT
3 2 TABLE ACCESS (BY INDEX ROWID) OF 'HX_MY_TBL' (TABLE) (Cost=3 Card=2 Bytes=24)
4 3 INDEX (RANGE SCAN) OF 'HX_MY_TBL_IDX' (INDEX) (Cost=1 Card=2)
5 1 HASH JOIN (Cost=5 Card=1 Bytes=46)
6 5 VIEW (Cost=2 Card=2 Bytes=46)
7 6 TABLE ACCESS (FULL) OF 'SYS_TEMP_0FD9D6967_3C610F9' (TABLE (TEMP)) (Cost=2 Card=2 Bytes=24)
8 5 VIEW (Cost=2 Card=2 Bytes=46)
9 8 TABLE ACCESS (FULL) OF 'SYS_TEMP_0FD9D6967_3C610F9' (TABLE (TEMP)) (Cost=2 Card=2 Bytes=24)
here you can see the table is accessed only once then only the result set generated by the WITH is accessed.
Thanks,
Karthick. -
Can u any imrove this query for maximum performance
select g_com_bu_entity bunt_entity
, g_com_rep_cd srep_cd
, effdt from_dt
, eff_status
, g_com_role role
, g_com_pgm prgm
, g_com_district district
, g_com_draw_status draw_status
, decode(g_com_primary_pgm, 'Y',1, 0) pri_prgm_flag
FROM ps_g_com_assign_vw@commissions c1
WHERE effdt =
(SELECT MAX (effdt)
FROM ps_g_com_assign_vw@commissions c2
WHERE c1.g_com_bu_entity = c2.g_com_bu_entity
AND c1.g_com_rep_cd = c2.g_com_rep_cd);
can anyone make it as regular query for maximum performance
Thanks,
SreekanthHi Sreekant,
Try this: If it helps
select g_com_bu_entity bunt_entity
, g_com_rep_cd srep_cd
, effdt from_dt
, eff_status
, g_com_role role
, g_com_pgm prgm
, g_com_district district
, g_com_draw_status draw_status
, decode(g_com_primary_pgm, 'Y',1, 0) pri_prgm_flag
FROM ps_g_com_assign_vw@commissions c1,
(SELECT MAX (effdt) effdt_max
FROM ps_g_com_assign_vw@commissions c2
WHERE c1.g_com_bu_entity = c2.g_com_bu_entity
AND c1.g_com_rep_cd = c2.g_com_rep_cd) t2
WHERE effdt = t2.effdt_max; -
Help to rewirte query for best performance
Hi All,
can you kindly help me to rewirte the below mentioned query for best performance. this is taking more than 20 min in our production server.
SELECT cp.name,mis.secondary_type U_NAME,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-161,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-154,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-154,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-147,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-147,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-140,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-140,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-133,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-133,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-126,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-126,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-119,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-119,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-112,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-112,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-105,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-105,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-98,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-98,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-91,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-91,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-84,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-84,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-77,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-77,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-70,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-70,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-63,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-63,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-56,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-56,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-49,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-49,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-42,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-42,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-35,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-35,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-28,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-28,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-21,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-21,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-14,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage,
count(CASE WHEN (mis.start_time between To_DATE(to_char(next_day (sysdate-14,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-7,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))THEN mis.event_audit_id END) Usage
FROM mis_event_audit mis,USER u,com_pros cp where
mis.user_id=u.email_address and u.cp_id=cp.cp_id
and (mis.start_time between To_DATE(to_char(next_day (sysdate-161,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy') and To_DATE(to_char(next_day (sysdate-7,'monday'),'MM/DD/YYYY'),'mm/dd/yyyy'))
GROUP BY cp.name, mis.secondary_type;
Thanks,
krishHi, Krish,
Something like this will probably be faster, because it cuts out most of the function calls:
WITH got_cnt AS
SELECT cp.name
, mis.secondary_type AS u_name
, COUNT (mis.event_audit_id) AS cnt
, ( TRUNC (mis.start_time, 'IW')
- TRUNC (SYSDATE, 'IW')
) / 7 AS week_num
FROM mis_event_audit mis
JOIN user_table u ON mis.user_id = u.email_address -- USER is not a good table name
JOIN com_pros cp ON u.cp_id = cp.cp_id
WHERE mis.start_time >= TRUNC (SYSDATE, 'IW') - 161
AND mis.start_time < TRUNC (SYSDATE, 'IW')
GROUP BY cp.name
, mis.secondary_type
, TRUNC (mis.start_time, 'IW')
SELECT name
, secondary_type
, SUM (CASE WHEN week_num = 22 THEN cnt END) AS week_23
, SUM (CASE WHEN week_num = 21 THEN cnt END) AS week_22
, SUM (CASE WHEN week_num = 20 THEN cnt END) AS week_21
, SUM (CASE WHEN week_num = 0 THEN cnt END) AS week_1
FROM got_cnt
GROUP BY name
, secondary_type
;TRUNC (d, 'IW') is midnight on the last Monday before or equal to the DATE d. It does not depend on you NLS settings.
Whenever you're tempted to write an exprssion as complicated as
, COUNT ( CASE
WHEN ( mis.start_time BETWEEN TO_DATE ( TO_CHAR ( NEXT_DAY ( SYSDATE - 161
, 'monday'
, 'MM/DD/YYYY'
, 'MM/DD/YYYY'
AND TO_DATE ( TO_CHAR ( NEXT_DAY ( SYSDATE - 154
,'monday'
, 'MM/DD/YYYY'
, 'MM/DD/YYYY'
THEN mis.event_audit_id
END
) AS usageseek alternate ways. Oracle provides several handy functions, especially for manipulating DATEs. In particular "TO_DATE (TO_CHAR ...)" is almost never needed; think very carefully before doing a round-trip conversion like that.
Besides being more efficient, this will be easier to debug and maintain.
If you're using Oracle 11.1 (or higher), then you can also use SELECT ... PIVOT in the main query, but I doubt that will be any faster, and it might not be any simpler.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Simplify the problem as much as possible. For example, instead of posting a problem that covers the last 23 weeks, pretend that you're only interested in the last 3 weeks. You'll get a solution that's easy to adapt to any number of weeks.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ {message:id=9360002}
For performance problems, there's another page of the forum FAQ {message:id=9360003}, but, before you start that process, let's get a cleaner query, without so many functions.
Edited by: Frank Kulash on Oct 2, 2012 11:50 AM
Changed week_num to be non-negative -
My mac says connect to a faster usb for better performance
every time i connect my ipod the mac says:
the ipod is connected to a low-speed USB 1.1 port. for better performance, you should connect it to a high-speed USB 2.0 port if one is available on your computer
whats that aboutIt means exactly what it says.
This message will pop up when you connect a device (the iPod) that works with USB 2.0, to USB 1.1 port.
USB 1.1 is 12 megabits per second.
USB 2.0 is 460 megabits per second (60 ttimes faster).
For better perfomrance, use a usb 2.0 port if your computer has one.
Unfortunately, your iBook G3 does not have USB 2.0. -
My application was designed based on MVC Architecture. But I made some changes to HMV base on my requirements. Servlet invoke helper classes, helper class uses EJBs to communicate with the database. Jsps also uses EJBs to backtrack the results.
I have two EJBs(Stateless), one Servlet, nearly 70 helperclasses, and nearly 800 jsps. Servlet acts as Controler and all database transactions done through EJBs only. Helper classes are having business logic. Based on the request relevant helper classed is invoked by the Servlet, and all database transactions are done through EJBs. Session scope is 'Page' only.
Now I am planning to use EJBs(for business logic) instead on Helper Classes. But before going to do that I need some clarification regarding Network traffic and for better usage of Container resources.
Please suggest me which method (is Helper classes or Using EJBs) is perferable
1) to get better performance and.
2) for less network traffic
3) for better container resource utilization
I thought if I use EJBs, then the network traffic will increase. Because every time it make a remote call to EJBs.
Please give detailed explanation.
thank you,
sudheer<i>Please suggest me which method (is Helper classes or Using EJBs) is perferable :
1) to get better performance</i>
EJB's have quite a lot of overhead associated with them to support transactions and remoteability. A non-EJB helper class will almost always outperform an EJB. Often considerably. If you plan on making your 70 helper classes EJB's you should expect to see a dramatic decrease in maximum throughput.
<i>2) for less network traffic</i>
There should be no difference. Both architectures will probably make the exact same JDBC calls from the RDBMS's perspective. And since the EJB's and JSP's are co-located there won't be any other additional overhead there either. (You are co-locating your JSP's and EJB's, aren't you?)
<i>3) for better container resource utilization</i>
Again, the EJB version will consume a lot more container resources. -
Oracle 8i - PL/SQL sub query not working in PROC, but works ins SQL
I have read about certain things not working in 8i and I think this is one of them, but I was wondering if anyone had a work around. In the place of the SELECT SYSDATE FROM DUAL, I have a table look up, where I am going to look up the OCN of the corresponding VENDOR_ID ( a column in the original query ). I am doing it in a decode statement because if the first condition in the decode statement is met, that's it. But if not, it needs to look up the OCN number in this other table. Simple enough, conceptually. I thought of a view but that necessitates a SELECT statement, too. Anyway, here is the code with the appropriate text bolded:
CREATE OR REPLACE PROCEDURE tstINS_RATE_ROUTE_RECORDS_PROC (GET_CUR_PERIOD IN DATE) IS
CUR_PERIOD DATE;
BEGIN
CUR_PERIOD := GET_CUR_PERIOD;
Insert into RATE_ROUTE (
CVBI_KEY
, VENDOR_ID
, OCN
, ST_CD
, PERIOD
, MDFY_DT )
Select
C.CVBI_KEY
, C.VENDOR_ID
<b>, decode( c.send_lca, 'YES', 'XXX', (SELECT SYSDATE FROM DUAL) )</b>
, decode( c.send_lca, 'YES', 'XX', SUBSTR(C.ZLOC,5,2) )
, CUR_PERIOD
, TO_CHAR(SYSDATE)
FROM
rpt_ds1_cnt_cat c
, cogs_resource cr
, cogs_t1activity ct1
, rpt_ds1_aloc_zloc_reverse_vw az
where (C.CVBI_KEY = CR.CVBI_KEY (+)
and CR.PERIOD = CUR_PERIOD)
AND (C.CVBI_KEY = CT1.CVBI_KEY (+)
and CT1.PERIOD = CUR_PERIOD)
and (az.master_route_name=c.aloc||'-'||c.zloc OR az.reversed=c.aloc||'-'||c.zloc)
END; -- INS_RATE_ROUTE_RECORDS_PROChave read about certain things not working in 8i and I think this is one of them,Yes as I said scalar sub-queries were also not recognized within PL/SQL in 8i.
Re: PLS-00103: Encountered the symbol "SELECT" when expecting one of the fo
I was wondering if anyone had a work around.Write a function that returns the value. You may incur a performance penalty from a context switch to PL/SQL, but it may be balanced by the decode optimization you are attempting. -
SQL Timestamp query for use with PointBase
I know this isn't an SQL forum, but I was wondering if someone could help me define an SQL query that returns rows from a table in a PointBase database with 2 separate TIMESTAMP fields. What I would like to do is return all rows where timefield1 is less than 2 hours later than timefield2.
I've tried things like:
select * from timetable where timefield1 < timefield2 + 2;
select * from timetable where timefield1 < timefield2 + time '02:00:00';
But haven't had any luck so far. Thanks in advance for any help you can give!usually SQL has a function called DATEADD where you take a timestamp, the amount to add and what to add it to.
So you would have
Select * from timetable where timefield1 < DATEADD(timefield2, 2, hours);
Not exactly that since I don't know PointBase so check its documentation fro such a command and then do you SQL using it. -
Upgrading the Hard Drive for better performance?
hello i have the new 17 inch macbook pro i couldn't wait to special order from apple so i settled with the stock model from the apple store. I am looking into buying a hard drive that runs at 7200rmp. i was wondering if it is possible to buy the exact drives that they put into the mbp? it is really important that the hard drive is best quality i can get. i want the seagate momentous 500gb @7200 but they are not available anywhere i look. I also have been reading that seagate drives tend to fail. Does anyone know of a really good hard drive that i can buy?
is a ssd going to be that much better in terms of performance? i manly do video editing and music creation with my mac.
so my question is what is the one of the bes hard drive for my unibody macbook pro that will be fast and reliable?
thanksI too am suspect of Seagate drives. If you want a 500 GB, 7200-rpm drive, I would wait for another manufacturer to introduce one.
I think that Hitachi drives are your best bet. They have been proven very reliable, and Apple has been using them a lot in their new products. I have noted links to some good ones for you to check out.
http://www.newegg.com/Product/Product.aspx?Item=N82E16822145228
http://www.zipzoomfly.com/jsp/ProductDetail.jsp?ProductCode=10008894
Read this article before you invest in SSD.
http://lenovoblogs.com/insidethebox/?p=141 -
Designing Web applications for better performance
Hi,
Let me explain the scenario.
We are following MVC architecture, where we have our JSP pages interacting with a controller
servlet , which decides what action to performed . It is using request despatcher method to redirect
the request object to jsp pages.
We have most of jsp pages as entry screens. We are not using java beans, fearing the complexity of master
details forms . ( we dont know how to use "bean technolagy" in case of detail entry screens).
In forms at a time we can have max 50 rows , with each row having 10 columns. When a particular page
need to be displayes for editing (may be with already existing data), the servlet will populate objects
and jsp will access data from these objects. Once the data is accessed , these objects will be removed
from the session.
Since we are removing the objects from the session (not keeping it certain amount of time too), if the
servlet /another jsp requires some information, we are forced to use "hidden variables". In the current
scenario, we are having at least 40-50 hidden variables passing from a jsp page to servlet.
We decided not to use session objects fearing that it will give lot of problem to server. But now it
is making our client "fat".
Eventhogh our application is big, we are not using any database side coding like triggers,stored procedures
etc? Is this create performance problems?
When our application runs, many times we can find that the request will not get processed correctly
in jrun sever or some times we gets blank window or some time jrun default server hangs.
we are using Jrun 3.0 and Solaris_JDK_1.2.2_05.
Pl. find my following questions.
1. is this right way to do the things (hidden variables).
2. Is creating session variables is going to hamper the performance of the system?Dear sandhyavk,
From my experience, you are better to put your hidden values into a JavaBean, simply a data object which is saved in a session, after you have accessed to it, you simply invalidate the session indeed. You can find more details from the following links from javaworld.com, I have adopted and amended it for my eIPO system, it is flexible and easy to maintain and understand.
* http://www.javaworld.com/javaworld/jw-01-2001/jw-0119-jspframe.html
* http://www.javaworld.com/javaworld/jw-01-2001/jw-0119-jspframe.html
I do hope that it can give you some ideas.
Best regards,
Anthony Lai -
Best option for better performance? Graphics card, RAM or new machine
Hi,
When running After Effects CS4 and rendering a layered effects scene I've notice the system and rendering time seem a little sluggish so I'm wanting to improve the systems performance and I'm wondering what my best route would be to achieve this.
New Graphics card?
More Ram?
Upgrade Mac for new model?
Any suggestions would be greatly appreciated.
I currently have the following spec:
Hardware Overview:
Model Name: Mac Pro
Model Identifier: MacPro1,1
Processor Name: Dual-Core Intel Xeon
Processor Speed: 2.66 GHz
Number Of Processors: 2
Total Number Of Cores: 4
L2 Cache (per processor): 4 MB
Memory: 5 GB
Bus Speed: 1.33 GHz
Boot ROM Version: MP11.005C.B08
Graphics Card
NVIDIA GeForce 8800 GT:
Chipset Model: NVIDIA GeForce 8800 GT
Type: GPU
Bus: PCIe
Slot: Slot-1
PCIe Lane Width: x16
VRAM (Total): 512 MB
Vendor: NVIDIA (0x10de)
Device ID: 0x0602
Revision ID: 0x00a2
ROM Revision: 3233
Displays:
Display Connector:
Status: No Display Connected
Cinema HD:
Resolution: 2560 x 1600
Pixel Depth: 32-Bit Color (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Rotation: Supported
Thanks
Mark> I found this under After Effects features, So is this a lie?
Native
64-bit operating system support, multiprocessor utilization, and
OpenGL acceleration help you work faster, taking full advantage of your
computer's power. Unmatched integration with other Adobe software
further streamlines your workflow.
Of the three things mentioned (64-bit, multiprocessing, and OpenGL), two are hugely important and one is minor.
> OpenGL—Interactive or OpenGL—Always On
OpenGL
mode provides high-quality previews that require less rendering time
than other playback modes. OpenGL can also be used to speed up rendering
to final output. OpenGL features in After Effects rely on OpenGL
features of your video hardware.
Yep. It can speed things up. Some. And at the expense of fidelity with the CPU renderer. The OpenGL-Interactive mode is the only one that most people use.
> So you'll need to explain the above comment because I'm not clear about
what you're stating, or at least the part about OpenGl not being
relevant to AE at all.
I said that "OpenGL is not very relevant at all to After Effects", not that it isn't relevant at all.
To use a car metaphor: If I wanted a car that went fast, I'd focus on horsepower, low-weight materials, and good tires first. Then, if I'd maxed all of those factors and still had some money left over, I might buy a spoiler for the back. But that wouldn't be my first area of focus.
Graphics cards can be very expensive. I see far too many people spend all of their budget on this less-important item and neglect the less expensive and more important factors like extra RAM and a second fast hard disk. I'm trying to keep you from making the same mistake.
BTW, the graphics card is much, much more important for Premiere Pro CS5. But that's a conversation for the Premiere Pro hardware forum. -
Hi,
Is there an Oracle equivilent to the LIMIT query ?
Basically, I want to limit the number of rows retrieved.
Thanks in advance!
JD.SELECT * FROM BigTable WHERE ROWNUM<=10as a follow up question can you use that for any
other type of query then SELECT? in MySQL forexample
you can use LIMIT on DELETE and UPDATE as well as
SELECT. Not as far as I know.
also another stupid question perhaps but theROWNUM
variable... Is it specific to the query/cursor orthe
table.?It must be used with care. For instance order by
occurs after the limit is applied.
One can use subqueries to get around the above though.thank you for the info... that is quite different then in operation to MySQL LIMIT (which is applied last after ORDER etc.) although that is expected in this case since it's part of the WHERE clause.. i guess that also means that HAVING will happen after as well?
Maybe you are looking for
-
hi guys, what is the easiest way to generate a full XML dump file from an Oracle database ? What are the right tools and methods for this in versions 8,9 & 10 ? thanks for your help ! Antoine
-
My co-worker and I both use MacBooks and are running 10.5.2. She gets her custom signature to show up in stationary templates and I don't. We also created a custom stationary style and neither of us can get a signature in that template. Are there any
-
Im partitioning my hard drive, i created a ubunutu (36gb) and swap space (8gb) and then clicked apply. After that it created the two, but left about 900mb of empty space. How can i merge that with my mac hd partition? *UPDATE: I figured it out I put
-
I have a PC running 7 and want to use my ipod classic as a hard drive, or get my music off it to my PC. I tunes won't let me but I can access my ipod just can't pull my music. HELP!!!
-
Dual monitor, each with a dock: Possible?
Hi, at work I hook my MB upto a 2nd screen, everything runs fine, I have them sat next to each other and can scroll from one to the other as if it's 1 wide screen, only the dock and menu bar can only site on one or the other. Is it possible to set th