Home » SQL & PL/SQL » SQL & PL/SQL » compare performance
compare performance [message #649364] Wed, 23 March 2016 12:27 Go to next message
desmond30
Messages: 41
Registered: November 2009
Member
I am trying to check performance of sql in a view, after removing a hint to check how long it takes,

i am using toad 11.6, what is the best way to test this ? lets assume myview has 10,000 rows.

example: i say select * from myview....the initial results come in 10 seconds (say 85 rows), but in toad we can choose to go until the last record (scroll until last record), and if my query returns 10,000 rows, so what time should I capture to know exactly how long it takes ?

10 seconds ? or wait until the last row is seen when i press scroll down ?
Re: compare performance [message #649365 is a reply to message #649364] Wed, 23 March 2016 12:30 Go to previous messageGo to next message
John Watson
Messages: 8938
Registered: January 2010
Location: Global Village
Senior Member
Well, the choice depends on whether you are interested in the time to retrieve the first 85 rows, or the time to retrieve all 10000 rows. It is up to you. Or is there something more complicated here?

[Updated on: Wed, 23 March 2016 12:30]

Report message to a moderator

Re: compare performance [message #649366 is a reply to message #649365] Wed, 23 March 2016 12:34 Go to previous messageGo to next message
desmond30
Messages: 41
Registered: November 2009
Member
i want to see all records, and see how long it takes..just wanted to ask if i select scroll down option, then count the time it takes until it displays the last row, if this is the right way to capture the time taken or not ?
Re: compare performance [message #649367 is a reply to message #649366] Wed, 23 March 2016 12:40 Go to previous messageGo to next message
John Watson
Messages: 8938
Registered: January 2010
Location: Global Village
Senior Member
I don't use TOAD. In SQL*Plus, I would do this:

set timing on
set autotrace traceonly
select .....

I would hope that TOAD has equivalent functionality. You need the traceonly facility to suppress the display of the rows (please don't say "record" when you men "row") which will distort the timing and be different for every client.
Re: compare performance [message #649372 is a reply to message #649367] Wed, 23 March 2016 12:56 Go to previous messageGo to next message
desmond30
Messages: 41
Registered: November 2009
Member
makes me think sql plus is better way to test..let me try
Re: compare performance [message #649375 is a reply to message #649372] Wed, 23 March 2016 13:21 Go to previous messageGo to next message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

TOAD s surely not the best tool.
I should say it is surely almost NEVER the best tool.
Use SQL*Plus to do professional things.

Re: compare performance [message #649377 is a reply to message #649375] Wed, 23 March 2016 13:51 Go to previous message
desmond30
Messages: 41
Registered: November 2009
Member
Thanks to everyone who replied ! I agree, and I can see that

1. set timing on and set autotrace traceonly gives me how long the query takes to give the result

by actually executing the query, and not printing the output. perfect !!

Previous Topic: Date Functions - Finding the quarter of the year
Next Topic: Compound Trigger
Goto Forum:
  


Current Time: Sun Jun 30 15:43:27 CDT 2024