|
|
|
|
|
|
| Author |
Message |
FERREIRA William (COFRAMI *nix forums beginner
Joined: 07 Mar 2005
Posts: 34
|
Posted: Tue Mar 15, 2005 1:21 pm Post subject:
CURRENT_TIME
|
|
|
hi
i need to know the execution time of a part of my pl/pgsql code
so, i tried to use CURRENT_TIME :
t_time_d TIME;
t_time_f TIME;
t_diff TIME;
select CURRENT_TIME into t_time_d;
//the traitment
select CURRENT_TIME into t_time_f;
t_diff=t_time_f-t_time_d;
raise notice 'DEBUT : % | FIN : % | DIFF : % | POUR :
%',t_time_d,t_time_f,t_diff;
my function is recursive and the problem is that i always get the same
result for each iteration
t_time_d is set at the first iteration and doesn't change
thanks |
|
| Back to top |
|
 |
Michael Glaesemann *nix forums Guru Wannabe
Joined: 15 Mar 2005
Posts: 159
|
Posted: Tue Mar 15, 2005 1:41 pm Post subject:
Re: CURRENT_TIME
|
|
|
On Mar 15, 2005, at 23:21, FERREIRA William (COFRAMI) wrote:
| Quote: | i need to know the execution time of a part of my pl/pgsql code
so, i tried to use CURRENT_TIME :
|
<snip />
| Quote: | my function is recursive and the problem is that i always get the same
result for each iteration
t_time_d is set at the first iteration and doesn't change
|
You're probably looking for timeofday(). See the docs at
http://www.postgresql.org/docs/8.0/interactive/functions-
datetime.html#FUNCTIONS-DATETIME-CURRENT
Hope this helps.
Michael Glaesemann
grzm myrealbox com
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Jan 08, 2009 8:15 am | All times are GMT
|
|
Payday Advance | Credit Cards | Mortgage Loans | Modded Xbox | Telecom Expense Management
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|