BCP - Input Line Too Long

Jan 21, 2008

My query has 9000 characters, so when I run BCP, I get "The input line is too long error". Is there any workaround? If so, can you please explain what it is?

Thanks in advance..

View 3 Replies


ADVERTISEMENT

Too Long Input String Problem.

Sep 12, 2007

Hello Everybody,I have a problem that I have an exception from a SQLDataSource when a user types in more characters to a TextBox then is allowed.First of all - is there ant built in ASP.NET way to handle that problem?Second - if not then I have to handle the Exception from the SQLDataSource myself. I can write a handler for that which will look like:1 protected void DetailsViewDS_OnUpdated(object sender, SqlDataSourceStatusEventArgs e)
2 {
3 if (e.Exception != null)
4 {
5 // do some stuff
6 }
7 }
 The problem is that I would like to show the user an error message which says how many characters he can insert. So the other question is: is there any way to get automatically from the SQL DB what is a maximum length of a varchar? If I use LEN/LENGTH it gives me the current length of given entry (which actually is the current length of the varchar). But I want to get the maximum length of this concrete varchar (NOT the varchar(max) - this shows maximum length of a varchar in general - like ~20000 ).I hope I did not make it too complex ;)All the best,Joseph A. Habdank 

View 6 Replies View Related

Error [BC30494] Line Is Too Long

Jul 25, 2007

Hi,
I have a problem with a report in SSRS 2005. I tried to add some custom code to a report.
The code is absolutely simple and correct.
But when trying to show the report the debugger shows the following error message:
error [BC30494] Line is too long.

When I remove the code the report works again.

The code is about 12 words and could not be the problem.

Could anyone help please?

Best regards,
Stefoon

View 4 Replies View Related

Forcing A Line Break In Long Text Field.

Mar 14, 2008

I have to output as one filed name, mailing address, and phone of each company that we do business with.
the out put must look as follows:
Company Name
Store number: #####
Street Address 1
Street Address 2
City, State Zip + 4
Phone: (###) ###-####


Each piece of data is a single field and will have to be concatenated into one.
How do I force the line breaks where I need them?



Also each piece of data will be compared to a €œsource€? for validity and I will need to mare the individual data pieces red where €œwrong€?. Like so:
VALID MY DATA
Company Name Company Name
Store number: ##### Store number: #####
Street Address 1 Street Address 1
Street Address 2 Street Address 2
City, State Zip + 4 City, State Zip + 4
Phone: (###) ###-#### Phone: (###) ###-####

Any ideas on how to do this? I have used IIF for conditional formating of field colors in the past, but my expierence is that it changes the WHOLE display field not just piece of data the IIF is wrapped around.

View 1 Replies View Related

Native Compiler Return Value: [BC30494] Line Is Too Long

Feb 2, 2007

I'm developing a very big and complex P&L report in RS2005 for a big bank which suppose to have 20 tables with around 12 groupings per table. This is similar like having or combining 20 reports in one big report with massive data from Analysis Services 2005 data source.

The report was successfully compiled only up to the fourth table. When I added the fifth table by copying and pasting from the fourth table and then compiled the report in Dev Studio, I've got the following error message:

An error occurred during local report processing. The definition of the report '/Profit and Loss' is invalid. An unexpected error occurred while compiling the expressions. Native compiler return value: '[BC30494] Line is too long.'.

I have carefully made sure that the fifth table has exactly the same definition as the fourth table which I copied from and which was successfully compiled.

The rdl file size is around 2.5MB with only 5 tables and if I eventually adds up to 20 tables I would expect the rdl file size could be around 10MB, which is quite large compared to normal reports.

Even though it seems does not make sense, I suspect the rdl file size getting too big for the compiler to compile the report.

Is there any maximum rdl size limit that RS2005 compiler can compile? Or any idea why this error happens?

Thanks

View 4 Replies View Related

SQLCMD - How Do I Pass Parameter At Dos Command Line To Input File?

Mar 23, 2007

I am not sure if this has been asked before but I couldn't find any thread talking about this.

Let's say we have a parameter in the .sql input file called @Start_Date, how can we pass the value of a particular date, for example, "02-28-2007" to @Start_Date via SQLCMD? is it possible?

I'm trying to skip the need to write a simple windows application...if things can be achieved via dos command line, that will keep everything simple!

thanks! :)

View 3 Replies View Related

Problem With Text Field: Text Input Too Long, Weird Characters

May 15, 2006

Hi,

Im a programmer for an university webportal which uses php and msssql.
When an user creates a new entry and his text is too long the entry is cut short and weird characters appear at the end of the entry.

For example:
http://www.ttz.uni-magdeburg.de/scripts/test-messedb/php/index.php?option=show_presse&funktion=presse_show_mitteilung&id=333

How can I set the text limit to unlimited?
Could it be something else?
Is there a way of splitting an entry to several text fields automatically?


Thanks in advance for any help you can give me,
Chris

View 3 Replies View Related

How Can I Remove The Line Feed/carriage Return In The Last Line Of The Exported Text File ?

Feb 27, 2007

Hi,
for some AP issue, the file I upload must be without the line feed/carriage return in the last line.
for example:

original fixed-length file (exported from SSIS)
line NO DATA
1 AA123456 50 60
2 BB123456 30 40
3 CC123456 80 90
4 <-- with line feed/carriage return in the last line

The file format that AP request. The file only has 3 records, so it should end in the third line.
line NO DATA
1 AA123456 50 60
2 BB123456 30 40
3 CC123456 80 90

Should I use script component to do it ? I am new for VB . Anyone would help me ?

Thank you all.

View 1 Replies View Related

Reporting Services :: Draw Trend Line For SSRS Line Chart 2005

May 4, 2012

I need the Trend line for the following data in Line chart they are the following data. The following are the graph are my output and i need the trend line for these Key_gap value.

This is the link [URL] ....

I need the same trend line for the Bar-Chart in SSRS 2005.

View 5 Replies View Related

Storing And Retrieving Line Breaks/newlines From Multi-line Textbox (C#)

Aug 31, 2007

I hope I'm posting this in the correct forum (forgive me if I'm not) since I'm not sure if this is an issue with inserting an item into a db or the processing of what I get out of it.  I wrote a basic commenting system in which someone my post a comment about something written on the site.  I wanted to keep it very simple, but I at least want the ability for a user to have newlines in their comment without having to hardcode a <br /> or something like that.  Is there a way for me to detect a newline if someone, for example, is going to their next paragraph?
Let me know if you need a better explanation.
Thanks in advance!

View 4 Replies View Related

ISQL: Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect Syntax Near ' '

Nov 8, 2006

G'day everyoneThat's a space between the ticks.It's all part of a longer script but seeing as the failure occurs online 1if exists (select * from dbo.sysobjects where id =object_id(N'[dbo].[config]') and OBJECTPROPERTY(id, N'IsUserTable') =1)drop table [dbo].[config]GOThat's three lines only. Does it matter that they're in Unicode?Any ideas?Kind regards,Bruce M. AxtensSoftware EngineerStrapper Technologies

View 3 Replies View Related

Displaying A Trend Line (in Line Chart) In SSRS

Feb 7, 2007

We have a line graph which plots the actual data points (x,y), everything is working fine with this graph. Now we need to add a trend line to this existing graph after going thro. the articles we came to know that there is no direct option in SSRS to draw a trend line. So we need to calculate the trend values ourselves which we need to plot as atrend line. This trend line is similar to the trend line which comes in Excel chart, do anyone know how to calculate the trend values from the actual data points. We got through several formulas, but were not clear, have anyone tried out exactly the same, if so please help us out by providing an example to calculate the trend values.

View 1 Replies View Related

Dynamically Change The Color Of The Line On A Line Graph

Oct 26, 2007

I have a line graph which shows positive and negative values. Is it possible to have the line one color when its negative and another when its positive?

kam

View 4 Replies View Related

How To Monitor Store Procedure (Line By Line)

Sep 29, 2001

HEllo can anybody tell me how to monitor a long store procedure
line by line. Also how to put progress bar in it to tell user how
much is done.

Sabih.

View 1 Replies View Related

BIDS Line Charts - Cant Remove Line?

Dec 12, 2007

Hi,

When creating a line chart, I would like to be able to show Markers for the data points, but no line between these points (as you can do in excel).

I have set the line setting to none (for the lines of interest), however the lines still show.

Is this a bug, or am i missing something obvious settings-wise?

Cheers,

M

View 7 Replies View Related

Line 1: Incorrect Syntax Near '-'. But There Is No '-' In First Line!

Dec 28, 2007

  HiIt's my stored procedure 1 CREATE PROCEDURE singleSearch2
2 @SQ nvarchar(30),
3 @pType nvarchar(11),
4 @pCol nvarchar(11)
5 AS
6 BEGIN
7 DECLARE @SQL NVarChar(1000)
8 SELECT @SQL='SELECT *,'
9 SELECT @SQL=@SQL+' CASE RTRIM(LTRIM(op))'
10 SELECT @SQL=@SQL+' WHEN '+CHAR(39)+'e'+CHAR(39)+' THEN '+CHAR(39)+'اجاره'+ CHAR(39)
11 SELECT @SQL=@SQL+' WHEN '+CHAR(39)+'r'+CHAR(39)+' THEN '+CHAR(39)+'رهن'+CHAR(39)
12 SELECT @SQL=@SQL+' WHEN '+CHAR(39)+'f'+ CHAR(39)+' THEN '+ CHAR(39) +' Ù?روش '+CHAR(39)
13 SELECT @SQL=@SQL+' WHEN '+CHAR(39)+'e r'+CHAR(39)+' THEN '+CHAR(39)+ 'اجاره - رهن '+CHAR(39)
14 SELECT @SQL=@SQL+' WHEN '+CHAR(39)+'e f'+CHAR(39)+' THEN '+CHAR(39)+'اجاره - Ù?روش '+CHAR(39)
15 SELECT @SQL=@SQL+' WHEN '+CHAR(39)+'r f'+CHAR(39)+' THEN '+CHAR(39)+' رهن - Ù?روش '+CHAR(39)
16 SELECT @SQL=@SQL+' WHEN '+CHAR(39)+'e r f'+CHAR(39)+' THEN '+CHAR(39)+'اجاره - رهن - Ù?روش'+CHAR(39)
17 SELECT @SQL=@SQL+' ELSE op END AS xop, CASE LTRIM(RTRIM(type)) '
18 SELECT @SQL=@SQL+' WHEN '+CHAR(39)+'z -'+CHAR(39)+' THEN '+CHAR(39)+'زمین'+CHAR(39)
19 SELECT @SQL=@SQL+' WHEN '+CHAR(39)+'m -'+CHAR(39)+' THEN '+CHAR(39)+'مسکونی'+CHAR(39)
20 SELECT @SQL=@SQL+' WHEN '+CHAR(39)+'t -'+CHAR(39)+' THEN '+CHAR(39)+'تجاری'+CHAR(39)
21 SELECT @SQL=@SQL+' ELSE [type] END AS [xtype] FROM [data] '
22 SELECT @SQL=@SQL+' WHERE ([type] LIKE %'+CHAR(39)+@pType+CHAR(39)+'%) AND ('+@pCol+' LIKE %'+CHAR(39)+@SQ+CHAR(39)+'%)'
23 Exec (@SQL)
24 END
25 GO
 and i face this error: Line 1: Incorrect syntax near '-'.

View 3 Replies View Related

Line Chart - Line Styles

Jan 16, 2008



Hi

Anyone have any idea how to make a line style dashed or dotted in a line chart please?

If I change the series style to dashed or dotted it still appears as a solid line, yet the legend displays a dashed or dotted line....

Thanks

View 7 Replies View Related

Style: Constraints - In-line Vs Out-of-line?

Apr 18, 2008

My question is about coding style for specifying constraints when creating tables.

Two styles for defining constraints:



In-line:
CREATE TABLE Fruit
(
FruitID INT IDENTITY(1,1)
CONSTRAINT PK_fruit PRIMARY KEY CLUSTERED,
FruitName NVARCHAR(50),
FruitTypeID INT
CONSTRAINT FK_fruit_fruit_types FOREIGN KEY
REFERENCES FruitTypes (FruitTypeID) ON UPDATE CASCADE,
DateCreated DATETIME DEFAULT GETDATE()
)
Out-of-line:
CREATE TABLE Fruit
(
FruitID INT,
FruitName NVARCHAR(50),
FruitTypeID INT,
DateCreated DATETIME
)

ALTER TABLE Fruit ALTER COLUMN FruitID INT NOT NULL

ALTER TABLE Fruit ADD
CONSTRAINT PK_fruit PRIMARY KEY CLUSTERED (FruitID),
CONSTRAINT FK_fruit_fruit_types FOREIGN KEY (FruitTypeID)
REFERENCES FruitTypes (FruitTypeID),
CONSTRAINT DF_fruit_date_created DEFAULT
GETDATE() FOR DateCreated

Which style do you prefer and why?

View 2 Replies View Related

Problem Showing Data From Select Line With Another Select Line In It

Apr 7, 2007

Hi
If i use this code i cant get the data showed, it show nothing."SELECT COUNT(DogImageDate) AS Amount, DogImageDate, DogImageID FROM EnggaardImages WHERE DogImageDate NOT LIKE (SELECT TOP 1 DogImageDate FROM EnggaardImages ORDER BY DogImageDate DESC;) GROUP BY DogImageDate ORDER BY DogImageDate DESC;"
But if i use this code i get data showed"SELECT COUNT(DogImageDate) AS Amount, DogImageDate, DogImageID FROM EnggaardImages GROUP BY DogImageDate ORDER BY DogImageDate DESC;"
Then i get Images(6)Images(1)Images(1)
But i dont want the first to be showed, therefor i use the Select TOP 1, so i get a look like this
Images(1)Images(1)
But i cant get it to work.

View 2 Replies View Related

There Was An Error Parsing The Query. [ Token Line Number = 1,Token Line Offset = 43,Token In Error = C]

Jul 27, 2007


Hello all
Trying to delete some data from a SSCE (2005) DB produces the exception:
SqlCeException
There was an error parsing the query. [ Token line number = 1,Token line offset = 43,Token in error = C]
Here is the code I am using

string dsc = Application.StartupPath + "\FCDB07.sdf";

conn = new SqlCeConnection("DataSource = " + dsc);

conn.Open();

cmd = conn.CreateCommand();

cmd.CommandText = "DELETE FROM DataContainer WHERE FileName =" + dgContainers[0, SelRowIndex].Value.ToString();

cmd.ExecuteNonQuery(); //There was an error parsing the query. [ Token line number = 1,Token line offset = 43,Token in error = C ]

conn.Close();

Any Idea on What causes this?

TIA
Trophus

View 3 Replies View Related

Error Parsing Query: [ Token Line Number = 1,Token Line Offset = 83,Token In Error = 5 ]

Nov 23, 2007

Hey all-

I'm trying to insert some values into an SQL Compact database on a WM6 device but there is something apparently wrong with my SQL statement...

The program is going to allow users to schedule an SMS message to be sent at a certain date and time. I'm using a database to keep track of the scheduled SMS messages. The database has 3 rows: phone number, message, and the date/time to be sent.

Here is the relevent code:


private void scheduleMenu_Click(object sender, EventArgs e)

{

//connect to DB and do our scheduling magic



string message = messageBox.Text; //should rename messageBox...

string phoneNum = phoneNumBox.Text;



string dataBase = @"Program FilesSMS_Scheduler2SMSDatabase.sdf";

//SqlCeEngine eng = new SqlCeEngine(dataBase);

SqlCeConnection conn = new SqlCeConnection("Data Source=" + dataBase);

conn.Open();



//insert phone number, message text, and date/time into DB
string cmd = "INSERT INTO Scheduler(phoneNum, message, date) VALUES("+ phoneNum + ", "+ message + ", "+ dateTimePicker1.Value +")";

SqlCeCommand cmdPhone = new SqlCeCommand(cmd,conn);





cmdPhone.ExecuteNonQuery(); //error occures here...



messageBox.Text = "";

MessageBox.Show("Message Scheduled!");

}



I'm guessing it doesn't like how I am trying to get the data from the different text boxes and the DateTimePicker to go inside the SQL command. Does anyone have any ideas on how to fix my SQL command or how to get data from a textbox and DateTimePicker to be inserted into a database a different way?

View 3 Replies View Related

BCP Input

Jan 4, 2006

Using MSDE and OSQL
I begin with:

C:OSQL -D VID -i C:accepted.sql -o C:Resultsaccepted.txt -n -w500 -Usa

That gives me data such as this:

363 Cynthia KY 36
542 Charlene NC 3
594 Amanda NJ 9
592 Robert NJ 54

Then this command to create a table

CREATE TABLE accepted
(
Customer_idnvarchar(50)NULL,
Cust_Namenvarchar(50)NULL,
Cust_Statenvarchar(50)NULL,
Cust_Countnvarchar(50)NULL
)
GO

I've created this BCP format file:

8.0
4
1 SQLCHAR 0 50 "/t" 1 Customer_id SQL_Latin1_General_CP1_CI_AS
2 SQLCHAR 0 50 "/t" 2 Cust_Name SQL_Latin1_General_CP1_CI_AS
3 SQLCHAR 0 50 "/t" 3 Cust_State SQL_Latin1_General_CP1_CI_AS
4 SQLCHAR 0 50 "/r/n"4 Cust_Count SQL_Latin1_General_CP1_CI_AS


Table is created. I can SELECT * FROM accepted and see my column names.

Then I try to BCP into the table using:

C:>BCP sales..east in C:Resultsaccepted.txt -t -f C:cpformataccepted.fmt -Usa -Ppwd

I get this error:

Starting copy...
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation

and so on......

In the .fmt file I've tried "", " ", " " and everthing I could think of as a delimiter. Still no luck. I've tried almost every switch available to both OSQL and BCP.
The data I am trying to BCP is a SQL result so I don't think any special delimiters are placed. I've tried not using the .fmt file and using the prompts but still no luck. Data is CAST in the query and doesn't excede 45 characters.
Hope I've explained my problem well enough.

-Deana

View 11 Replies View Related

SQL String Too Long?

Dec 28, 2006

My SQL statement: 
SQL Server seems to think my SQL Statement is too long........ I'm not sure why. 
"INSERT INTO tblChangeControls (Initiator,BPM,AddRemMod,ChangeType,SpecificChange,ChangeDescription,TechnicalDescriptionOfChange,DateInitiated) select 'Benjamin Short' ,'6' ,'2' ,'Printer' ,'40' ,'' ,'';"
Error message: 
The identifier that starts with 'INSERT INTO tblChangeControls (Initiator,BPM,AddRemMod,ChangeType,SpecificChange,ChangeDescription,TechnicalDescriptionOfChange,' is too long. Maximum length is 128.

View 2 Replies View Related

How Long Ago Did Something Happen

Jan 7, 2008

Hey, ive got a listof events that have occured on my site, updates etc. and Im trying to show how long ago the updates happened. For instance, say the date of an update is : 16/10/2007 15:16:03 I want the Label to say "Happened over 2 months ago" etc.Now ive tryed to use an IF statment but I cant seem to get it right :         DateTime dt = Convert.ToDateTime("16/10/2007 15:16:03");        if(dt.ToShortDateString() == DateTime.Now.ToShortDateString())        {   //happened today            if(dt.ToShortTimeString() == DateTime.Now.ToShortTimeString()||dt.ToShortTimeString() < DateTime.Now.AddMinutes(-1).ToShortTimeString())            {   //happened within a minute                UpdateLabel.Text = "About A Minute Ago";            }        }        else if (dt.ToShortTimeString() == DateTime.Now.AddDays(-1).ToShortTimeString())        {   //happened yesturday            UpdateLabel.Text = "Updated Yesturday";        }        else if (dt.ToShortDateString() == DateTime.Now.ToShortDateString() || dt.ToShortDateString <= DateTime.Now.AddDays(-7).ToShortDateString())        {            UpdateLabel.Text = "Updated Last Week";        }Any ideas where Im going wrong? Im probally staring it straight in the face, but I cant see it. Thanks in advance John 

View 1 Replies View Related

Long Query - 100% CPU

Aug 10, 2001

SQL 7.0 SP1 - NT 4.00 EE SP6a - Cluster - Multiprocessor(2)-VB 6.0 SP4.
Maybe a very stupid question,but I need to know if it is possible to assign a low priority to a VB exe that query for long time eating all the CPU (100% in task manager).
Thank you.
Franco

View 2 Replies View Related

Long Text In SQL

Jul 18, 2000

I have a challenge and am not very versed with coding this situation. The situation is I am trying to put long text (more that 255 char) in a ntext field in SQL7, but the max char can input is only 255. Anyone can advice on how to put in more that 255 char in a field as well as how to select back the record whice more than 255 char.

Please give advice if you encounter this problem before.

Regards.

View 2 Replies View Related

SQL Long Text

Jul 24, 2000

Anyone have same sample on how to put in and retrive long text (more then 255 characters).
Please Comment.

------------
Ray Miao at 7/19/00 8:24:08 AM

You should use readtext and writetext to access text column. By the way, nchar and nvarchar can hold up to 4000 characteres.


------------
Wong at 7/18/00 11:43:15 PM

I have a challenge and am not very versed with coding this situation. The situation is I am trying to put long text (more that 255 char) in a ntext field in SQL7, but the max char can input is only 255. Anyone can advice on how to put in more that 255 char in a field as well as how to select back the record whice more than 255 char.

Please give advice if you encounter this problem before.

Regards.

View 1 Replies View Related

How Long Is &#39;text&#39;?

Mar 2, 2000

How long exactly is the text datatype in non-unicode characters for SQLS7? I guess I need to find out how long my input is and break it up into multiple text fields, but what's the max length?

View 3 Replies View Related

Long Names

Mar 6, 2001

I have created a database which has a table whose name is 128 characters long; this table has a column whose name is 128 characters long. When I issue the command sp_helpconstraint table_name, SQL Server 7 returns the message "string or binary data would be truncated."

Any suggestions?

Thanks!

View 1 Replies View Related

&#34; .......too Long, Max Length Is 128&#34;

Sep 22, 2000

Hi
When writing a stored procedure,sometimes the line of sql code could be very long and be more than 128 caracthers.
I got an error message saying that the code is vey long and the maximum is 128.
But at the same time, this is erratic in MSSQL server because it works sometimes even with a line of code of more than 800 caracters...
Have you ever experienced the same problem??
What is the solution?
Thanks

View 1 Replies View Related

How Long Does An Upgrade Take?

Jul 4, 2002

I am upgrading SQL 7 to SQL 2000. The upgrade process has been running for over 3 hours. I have about 9G in databases on the server. Does anyone know if this is taking too long? Compaq Proliant 7000, dual Xeon II processors, 786MB memory. "Setup is updating your system..." has been running for 3 hours...
TIA
Janet

View 3 Replies View Related

How Long To Shrink DB

Jun 25, 2004

Hi,
Roughly how long would it take to shrink a 300GB db, its been running over 8 hours already (throught enterprise manager)?



Thanks in advance
aido.

Dual P4 xeon 2gb ram 350gb scsi raid array

View 3 Replies View Related

What Is Taking So Long?

Feb 13, 2008

Hello.

I have a query that takes 1,5second to execute, but only 150ms of CPU. The query is quite simple, just one where statement against a clustered index.

SQL Server Execution Times:
CPU time = 156 ms, elapsed time = 1595 ms.



SELECT column1, column3, column4, ..., column10 FROM table WHERE column2 IN (37, 41, 43, 45, 49, 53, 55) ORDER BY column3 DESC



|--Sort(TOP 1000, ORDER BY:([u].[LastActivityDate] DESC))
|--Clustered Index Seek(OBJECT:([MP].[dbo].[__searchtest].[cix___searchtest_] AS [u]), SEEK:([u].[searchparamid]=37 OR [u].[searchparamid]=41 OR [u].[searchparamid]=43 OR [u].[searchparamid]=45 OR [u].[searchparamid]=49 OR [u].[searchparamid]=53 OR [u].[searchparamid]=55 OR [u].[searchparamid]=59) ORDERED FORWARD)





I have tried to rewrite the query to an INNER JOIN instead.


|--Sort(TOP 1000, ORDER BY:([u].[LastActivityDate] DESC))
|--Nested Loops(Inner Join, OUTER REFERENCES:([spal].[number]))
|--Index Seek(OBJECT:([MP].[dbo].[__search_parameters_lookup].[IX___search_parameters_lookup] AS [spal]), SEEK:([spal].[hash]=-1726604993) ORDERED FORWARD)
|--Clustered Index Seek(OBJECT:([MP].[dbo].[__searchtest].[cix___searchtest_] AS [u]), SEEK:([u].[searchparamid]=[spal].[number]) ORDERED FORWARD)


but the query still takes 1,5 seconds.


It spends 59% (according to execution plan) of sorting. 14% for the index seek of the __search_parameters_lookup table and then 24% of a clustered index seek of the __searchtest table.


How come it only uses that small of CPU but it still takes 1,5 seconds? It seems to be reading from memory as well so it shouldnt be an IO-problem?

The index I have on the table is a clustered index on (column 2).

Any ideas of how I can improve this? I have tried with DTA, also with a non clustered index on column3.

If I remove some columns from the SELECT-list the query will execute alot faster:

SQL Server Execution Times:
CPU time = 32 ms, elapsed time = 32 ms.

Booth the CPU and the elapsed time goes down and now appears to be more normal.

So there seems to be a problem caused by data transfer.
I tried to do a remake and normalize the table and when I do that I get the query execute with a speed of 400ms CPU and 400ms total. And this is still the exact same result, so why does it only spend 400ms of "rendering" or fetching the data when the tables are normalized but 1500ms when its denormalized?

Any ideas?

I am running Microsoft SQL Server 2000 - 8.00.2039

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved