Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In need of a complex query

Status
Not open for further replies.

Tison

Programmer
May 12, 1999
216
CH
I am trying to write a query that I can use to test server response times.
I have a simple table (Name char(8),Txt char(8), Number numeric(8))
This query does not do enough work ;
select name,txt,max(number) from steve_test
group by name
order by txt desc

Any ideas ?
 
The table only has 100 rows.
I would not like to add other tables because I want a simple solution that I can copy to other servers.
I would like to exercise both cpu and io but at different runs.
 
Try this and give me ur feed back
select name,txt,max(number),substring(txt, 1,3), charindex(txt, "x") from steve_test
where (select count(*) from steve_test
group by name)
group by name
order by txt desc

Pls note: The reason for using substring and charindex is just to put load on the server (and also chk the syntax of the charindex thing)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top