![]() | |
![]() |
| | Thread Tools | Display Modes |
#51
| |||
| |||
|
|
I am calling this query from a java application using jdbc type 4 drivers (from a remote machine) and displaying it in a report. Well you are right, the time taken depends on the network as well. But i was just wondering as to how can i get the time taken by the network and the query seperately. "Andrew J. Kelly" wrote: I run this command almost daily against much larger files than 200MB with no problems. You didn't say it was a remote query. It really helps to have all the details. Why are you trying to run this remotely? The network and client will obviously have an impact on performance and will depend on what those are. What is the client you are trying to read all of this data into and what is it doing with the data it reads? I wrote a C# app that reads the trace files into a data table and processes them one row at a time with a parser. I can easy process over a million rows in just a few seconds with the file on the same machine as the app. It is not the query or SQL Server that is the holdup it must be your client or network. -- Andrew J. Kelly SQL MVP Solid Quality Mentors "Munish Narula" <munish.narula (AT) wipro (DOT) com> wrote in message news:AE2E653B-3B84-4B85-87EF-FF6E6749942C (AT) microsoft (DOT) com... Hi, The CPU and the memory configuration is very high. That is not a problem.. You must be executing the query on the same machine on which SQL is installed. Try executing it from some SQL client or say from some java program. Also check the trace file size. It should be atleast 200 MB. It would be really great if anyone could help me optimize this query. Regards, "Andrew J. Kelly" wrote: That pretty slow as I can read that on my laptop in just a few seconds. I suspect your hardware is way underpowered. I would expect that adding memory and increasing the CPU speed will help the most. Also make sure you don't have an Antivirus program that is scanning the file as you read it. -- Andrew J. Kelly SQL MVP Solid Quality Mentors "Munish Narula" <munish.narula (AT) wipro (DOT) com> wrote in message news:7B2A1536-7C84-4F4D-9795-AC4017682146 (AT) microsoft (DOT) com... I am using fn_trace_gettable for fetching records from trace file which is around 256 MB. the query is something like select * from fn_trace_gettable('c:\traces\trace.trc', 1); This query takes around 133 sec to fetch records and the time taken to run the query increases as the size of the file increases. Please let me know how can i tune the query so that the query becomes faster. Note: I cannot use a where clause for fetching data, I have to fetch all the records at once. |
![]() |
| Thread Tools | |
| Display Modes | |
| |