Can i create 23 functions in one proc
Hi,
Can I create 23 functions in one proc. In that functions data is manipulating at a time 6000 to 50000 records.
Eg: 6000 time taking 2 minutes
Will get any performance issue when I manipulate 20000- 50000 records at a time.
There's no performance issue.
Pls suggest me,
-Thanks,
Well from Pl/sql perspective you can declare any number of functions within a procedure.
But Ennisb is right: you should be more cleare in what you try to achieve.
AQ is really, really fast. So if these 5000, 6000 records are enqueued on a queueu you can create a job that dequeues and processes these a message at a time until the queue is empty. This job you could schedule several times using dbms_job in parallel. Then you'll find that the processing is really fast.
Regards,
Martien
Similar Messages
-
Can't create a function in SQL windows of PL/SQL Developer.
The function is :
create or replace function Xgyh
(pvc2Czy in varchar2,
pnumYhid in number,
pvc2Lfid in varchar2,
pvc2Grzid in varchar2,
pvc2Zbmid in varchar2,
pvc2Bmid in varchar2)
return number is
intZxbz integer:=1;--返回值(1:正确,0:错误);
numDxlb number;
numGx number;
begin
--判断指定用户是否合法
if pvc2Czy is null then
intZxbz:=0;
end if;
if pnumYhid is not null then
if pvc2Lfid+pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Lfid is not null then
if pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Grzid is not null then
if pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Zbmid is not null then
if pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Bmid is null then
intZxbz:=0;
end if;
--取当前登陆操作员在数据权限表中权限并判断是否允许更新当前用户
if intZxbz=1 then
select t.更新,
decode(t.对象类别,'用户',0,'楼房',1,'供热站',2,'子部门',3,'部门',4,'集团',5)
into numGx,numDxlb
from 系统_数据权限_表 t
where t.用户=pvc2Czy
and (t.对象类别,t.对象识别码) in
(('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))
and rownum=1
order by 2,1;
end if;
--返回信息
return(numGx);
end Xgyh;
If get rid of the where condition
'and (t.对象类别,t.对象识别码) in
(('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))',
this function can be created fast.
Thanks for you help!This is duplicated question.
Can't create a function in database
William Robertson and I have described some advices for you.
Is my English poor?
If you couldn't get theirs (mikerault, William Robertson et al.) and my advices,
You can ask that on ITPUB (this is Chinese site).
Here it is. http://www.itpub.net/
And this site is not only for Oracle.
I think they can help you in Chinese words.
PS.
I learn that
'Gongrezhan' means the center of supplying heating to building,
and this center is the characteristic systems in Beijing or more cold district.
PS.2
Your script includes simplified Chinese character-set.
Even if you were not Chinese person,
we all think you can understand Chinese words. -
Can we create a folder in one desktop without sharing that folder in other desktop in mac?
I have created a few desktop in my mac. Can i create a folder in one desktop, which does not share in other desktop?Can I have different folders in different desktop? how to do that?
No. Desktop spaces affect only applications and their windows. If an icon appears on the desktop it appears on every desktop.
-
Certain Numbers templets allow you to drag and drop contacts to populate cell data, how can I create that functionality in my own tables?
If you haven't come across the workarounds thread you may find helpful tips there on this and other ways to work with Numbers 3.
ronniefromcalifornia discovered how to bring contacts into Numbers 3. As described in this post:
"Open Contacts
Select all the cards you want
Copy
In Numbers, in a table, select cell A1
Paste
Boom. Works great. Even brought in the pictures. Cool."
So instead of drag and drop, just select in Contacts, copy, and paste into Numbers
SG -
How can i creat several rectangles with one draw rect.vi
how can i creat several rectangles with one draw rect.vi? thanks
Solved!
Go to Solution.You can call it in a for loop, with an array of the rectangle coordinates you want to draw. Is this what you mean?
CLA, LabVIEW Versions 2010-2013
Attachments:
rectangle.png 11 KB -
Can i create aggrecate functions
hi,
can we create aggrecate functions like max().
pl. give me the steps to do it.
thanks in advance.
regards,
kathirWhen u mean create, u mean re-write the
whole function ? please elaborate -
How can I create a function of sound volue from time using AudioQueueBufferRef??
I have a question how can I analyze class AudioQueueBufferRef, for creating a function of sound volue from time?? Here is what I get . there is AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex]; volume height is 2000 elements from SInt16* coreAudioBuffer = (SInt16*)fillBuf->mAudioData. so function looks like H(t*i)=coreAudioBuffer[i] where t = 1/sampleRate = 1/22050 but here is a problem. my program gets sound and uses a class AudioStreamer for this. AudioStreamer has 3000 lines when I play music from Free Internet Radio - SHOUTcast Radio - Thousands of Free Online Radio Stations. internet radio - my problem is as follows either I dont know where 85 % of sound information is or I dont know how I can analyze class AudioQueueBufferRef
Here is the code where I analyze Buffer.
{@synchronized(self)
if ([self isFinishing] || stream == 0)
return;
inuse[fillBufferIndex] = true; // set in use flag
buffersUsed++;
// enqueue buffer
AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex];
fillBuf->mAudioDataByteSize = bytesFilled;
// ======>in this place I analyze Buffer
if (packetsFilled)
err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, packetsFilled, packetDescs);
else
err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, 0, NULL);
when bitRate = 24 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 1,5 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.15 so it is 15 % of all information
as a result If buffer comes at 0.0 seconds he lasts up to 0.1 seconds.farther in my function there is no volume. second buffer comes in 0.7 seconds and lasts up to 0.8 seconds. but in reality the sound doesnt breaks. Maybe I'm doing something wrong .please tell me.
just for comparison
when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 2 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all information
when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 1660 double sampleRate=asbd.mSampleRate == 44100 numberOfChannels = asbd.mChannelsPerFrame == 2 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.02 number of buffers per second float numBuffersInOneSeconds == 10 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all informationYou cannot write custom commands for expressions.
That being said, there are a couple of options:
Create a subsequence with a single step. Use a parameter of the sequence as "function parameter".
Create a custom step type including a substep module which implements the function. Add an edit substep to enable the user of the steptype to gracefully change the parameter.
Store the variable parameter in a local/file global variable and modify the value in each step. This will, at least, keep the "function" the same for every step.
Norbert -
In one sequence I have dozens of Pre-Expressions which are almost the same thing, like this...
Locals.tagID = (Parameters.singlePhaseEnabled ? "L" : "D") & Str(Locals.phase) & "006"
...and the only thing different is that three digit string at the end ("006" will vary). How can I write a function that I can call from a step's Pre-Expression so it would look something like this? ...
Locals.tagID = MyNewFunction("006")You cannot write custom commands for expressions.
That being said, there are a couple of options:
Create a subsequence with a single step. Use a parameter of the sequence as "function parameter".
Create a custom step type including a substep module which implements the function. Add an edit substep to enable the user of the steptype to gracefully change the parameter.
Store the variable parameter in a local/file global variable and modify the value in each step. This will, at least, keep the "function" the same for every step.
Norbert -
Can't create a function into database
The function is :
create or replace function Xgyh
(pvc2Czy in varchar2,
pnumYhid in number,
pvc2Lfid in varchar2,
pvc2Grzid in varchar2,
pvc2Zbmid in varchar2,
pvc2Bmid in varchar2)
return number is
intZxbz integer:=1;--返回值(1:正确,0:错误);
numDxlb number;
numGx number;
begin
--判断指定用户是否合法
if pvc2Czy is null then
intZxbz:=0;
end if;
if pnumYhid is not null then
if pvc2Lfid+pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Lfid is not null then
if pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Grzid is not null then
if pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Zbmid is not null then
if pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Bmid is null then
intZxbz:=0;
end if;
--取当前登陆操作员在数据权限表中权限并判断是否允许更新当前用户
if intZxbz=1 then
select t.更新,
decode(t.对象类别,'用户',0,'楼房',1,'供热站',2,'子部门',3,'部门',4,'集团',5)
into numGx,numDxlb
from 系统_数据权限_表 t
where t.用户=pvc2Czy
and (t.对象类别,t.对象识别码) in
(('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))
and rownum=1
order by 2,1;
end if;
--返回信息
return(numGx);
end Xgyh;
If get rid of the where condition
'and (t.对象类别,t.对象识别码) in
(('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))',
this function can be created immediately.
Thanks for you help!I read ITPUB, and understand detailed situation a little.
The problem is not that any error occur on compiling,
but that compiling slows down with some conditional clause(*1).
It takes half a day or more(*2) to compile.
I think that must hung up.
Really? Is it really happen?
If that is true, You had better contact Oracle Support.
(*1)
The additional condition is like as follows.
and (t.MB_named_column1,t.MB_named_column2) in
(('MB_data1',0),('MB_data2',pvc2Bmid),('MB_data3',pvc2Zbmid),('MB_data4',pvc2Grzid),('MB_data5',pvc2Lfid),('MB_data6',pnumYhid))
Here, MB means MultiBytes.
(*2)
'half a day or more' is my literal translation.
It may mean only 'very long time'.
Message was edited by:
ushitaki
Added the more detailed explanation. -
Can't create a function in database
The function is :
create or replace function Xgyh
(pvc2Czy in varchar2,
pnumYhid in number,
pvc2Lfid in varchar2,
pvc2Grzid in varchar2,
pvc2Zbmid in varchar2,
pvc2Bmid in varchar2)
return number is
intZxbz integer:=1;--返回值(1:正确,0:错误);
numDxlb number;
numGx number;
begin
--判断指定用户是否合法
if pvc2Czy is null then
intZxbz:=0;
end if;
if pnumYhid is not null then
if pvc2Lfid+pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Lfid is not null then
if pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Grzid is not null then
if pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Zbmid is not null then
if pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Bmid is null then
intZxbz:=0;
end if;
--取当前登陆操作员在数据权限表中权限并判断是否允许更新当前用户
if intZxbz=1 then
select t.更新,
decode(t.对象类别,'用户',0,'楼房',1,'供热站',2,'子部门',3,'部门',4,'集团',5)
into numGx,numDxlb
from 系统_数据权限_表 t
where t.用户=pvc2Czy
and (t.对象类别,t.对象识别码) in
(('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))
and rownum=1
order by 2,1;
end if;
--返回信息
return(numGx);
end Xgyh;
If get rid of the where condition
'and (t.对象类别,t.对象识别码) in
(('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))',
this function can be created immediately.
Thanks for you help!I try translating from Chinese to English words including column name and data.
But, I can't understand the Chinese word Gongrezhan, so this is Pinyin.
And, I have not analyzed your function, yet.
Because, I just now must go to Chinese conversation class.
By the way, it should be that tables and columns named by multibytes is enclosed by double quotation.
For example,
select t.更新, -> select t."更新"
from 系统_数据权限_表 t -> from "系统_数据权限_表" t
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements008.htm#i27561
create or replace function Xgyh
(pvc2Czy in varchar2,
pnumYhid in number,
pvc2Lfid in varchar2,
pvc2Grzid in varchar2,
pvc2Zbmid in varchar2,
pvc2Bmid in varchar2)
return number is
intZxbz integer:=1;-- return value (1:Success, 0:Error)
numDxlb number;
numGx number;
begin
-- Check whether the assigned user is correct or not
if pvc2Czy is null then
intZxbz:=0;
end if;
if pnumYhid is not null then
if pvc2Lfid+pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Lfid is not null then
if pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Grzid is not null then
if pvc2Zbmid+pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Zbmid is not null then
if pvc2Bmid is null then
intZxbz:=0;
end if;
elsif pvc2Bmid is null then
intZxbz:=0;
end if;
--Check whether current database entry operator has priviledge of updating current user.
if intZxbz=1 then
select t."Update",
decode(t."TargetClass",'User',0,'Bilding',1,'Gongrezhan',2,'Department',3,'Division',4,'Group',5)
into numGx,numDxlb
from "System_DatabasePriviledge_Table" t
where t."User"=pvc2Czy
and (t."TargetClass",t."TargetID") in
(('Group',0),('Division',pvc2Bmid),('Department',pvc2Zbmid),('Gongrezhan',pvc2Grzid),('Bilding',pvc2Lfid),('User',pnumYhid))
and rownum=1
order by 2,1;
end if;
--Return Informations
return(numGx);
end Xgyh; -
Can i create a function which can take infinite parameter.
Can i make a function which get infinite parameter.
like avg.Kamran Riaz wrote:
Can i make a function which get infinite parameter.
like avg.I think you'll have trouble finding anything to take infinite parameters cos that would be bigger than the universe itself.
User defined aggregate functions example...
http://asktom.oracle.com/pls/asktom/f?p=100:11:335287534824285::::P11_QUESTION_ID:229614022562
[email protected]> create or replace type StringAggType as object
2 (
3 theString varchar2(4000),
4
5 static function
6 ODCIAggregateInitialize(sctx IN OUT StringAggType )
7 return number,
8
9 member function
10 ODCIAggregateIterate(self IN OUT StringAggType ,
11 value IN varchar2 )
12 return number,
13
14 member function
15 ODCIAggregateTerminate(self IN StringAggType,
16 returnValue OUT varchar2,
17 flags IN number)
18 return number,
19
20 member function
21 ODCIAggregateMerge(self IN OUT StringAggType,
22 ctx2 IN StringAggType)
23 return number
24 );
25 /
Type created.
[email protected]>
[email protected]> create or replace type body StringAggType
2 is
3
4 static function ODCIAggregateInitialize(sctx IN OUT StringAggType)
5 return number
6 is
7 begin
8 sctx := StringAggType( null );
9 return ODCIConst.Success;
10 end;
11
12 member function ODCIAggregateIterate(self IN OUT StringAggType,
13 value IN varchar2 )
14 return number
15 is
16 begin
17 self.theString := self.theString || ',' || value;
18 return ODCIConst.Success;
19 end;
20
21 member function ODCIAggregateTerminate(self IN StringAggType,
22 returnValue OUT varchar2,
23 flags IN number)
24 return number
25 is
26 begin
27 returnValue := rtrim( ltrim( self.theString, ',' ), ',' );
28 return ODCIConst.Success;
29 end;
30
31 member function ODCIAggregateMerge(self IN OUT StringAggType,
32 ctx2 IN StringAggType)
33 return number
34 is
35 begin
36 self.theString := self.theString || ',' || ctx2.theString;
37 return ODCIConst.Success;
38 end;
39
40
41 end;
42 /
Type body created.
[email protected]>
[email protected]> CREATE or replace
2 FUNCTION stringAgg(input varchar2 )
3 RETURN varchar2
4 PARALLEL_ENABLE AGGREGATE USING StringAggType;
5 /
Function created.
[email protected]>
[email protected]> column enames format a30
[email protected]> select deptno, stringAgg(ename) enames
2 from emp
3 group by deptno
4 /
DEPTNO ENAMES
10 CLARK,KING,MILLER
20 SMITH,FORD,ADAMS,SCOTT,JONES
30 ALLEN,BLAKE,MARTIN,TURNER,JAME
S,WARD
[email protected]> -
Can we create two Filters for one cube
Hi all,
I created two filters for one cube (in 11v), I assigned this filters to one user in shared services , so which filter work,
I think ,We have to assign only one filter for one user , please i need clarification....
Thanks
Edited by: user98631 on 12 mars 2010 05:13You can create many filters for one cube. I usually associate one group per filter and a user can have one or more groups assigned to them. Can't remember what happens when a user has access to conflicting filters (i.e. the order of preference). It is in the DBAG I am sure though.
-
Can i create two transcation in one connection
there are two sql need to excute.
and them need to in two diffrence transcation
but i have only one connection.
how to do it.can you tell me?For one of the statements use an autonomous transaction.
eg:
declare
pragma autonomous_transaction;
begin
--insert,update,delete, etc
commit;
end;
David -
How Can I Create a Function to Return to a Specific Menu on DVD Studio Pro?
Hello, I am currently building a DVD for a TV series I created while in college, and I'm having trouble figuring out how to create a function within the DVD that lets the user select the title or menu buttons on their remotes and have that return them either to a) the main menu or b) the menu they were just at, ie episode select or chapter select. Any help is appreciated! Thanks!
Thanks for the help. I'm still a little confused on how to get it select which menu that I would like to return to.
-
How can i create f4 functionality
Hi frds,
My requirement is diff plant create diff report no , but all the plant are see all the report no.
I want to prevent for every one plant that is one plant created report no not see other plant.
Is it possible ,Pls suggest me.
Thanks in advance.HI ,
r u using the Module Pool Program?
If so u can add functionality in the POV of the field.
Other wise use the below function module.
DATA: BEGIN OF lt_table OCCURS 0,
dappl TYPE dappl,
cvtext TYPE cvtext,
END OF lt_table,
lt_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
SELECT dappl cvtext FROM tdwp INTO TABLE lt_table.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'DAPPL'
DYNPPROG = 'SAPLIQS0'
DYNPNR = '7200'
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = lt_table
FIELD_TAB =
return_tab = lt_return
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE lt_return INDEX 1.
MOVE lt_return-fieldval TO p_dappl.
With Regards,
Sumodh.P
Edited by: Sumodh P on Apr 21, 2010 8:06 AM
Maybe you are looking for
-
Error occurred while configuring vision acqusition.
Hi all, I am trying to incorporate a camera in my VI. I have done this before using labview 8.5 and vision acquisition. Now I am trying from another machine which has labview 2011. I tried 2 USB camera with vision acquisition and both failed. It show
-
Hi All, When we tried connecting ap, its registering to the WLC 5508 with version 7.6.120.0. But it shows operational status as DOWN in WLC and blinking in red,green continuously. If i admin disable it, then it is coming UP and instantly goes DOWN.
-
I am using FCP 6.0.6. I need to rename many of the .mov files used in my FCP projects. Will I be able to reconnect them once, or will I need to reconnect the media everytime? What else should I be on the look out for? Alternatively, I have a back up
-
I just bought an unlocked Iphone 4s and I wanna know if I need to take an Iphone plan or a 30$ plan could be enough and also if I only use it on wi-fi do I need to have datas in my plan?
-
Automated Batch Overide Save As not working
I have created an action in CS4 that includes a Save for Web at that end. When I try to run an Automated Batch and change the save folder location using the overide check box and selecting the new forlder, the batch run still saves to folder specifie