urgent - sql table does not work any more as i tshould

Hello,
I added a column to a table in sql 2014. After it I am only able to get limited number of rows when I select from it and it takes a long time.
Is there a way to fix the table. I appreciate your help - it is very urgent to fix this.
Greetings,
johnson1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
There's not enough information here to answer your question.

Explain 'I am only able to get a limited number of rows when I select from it, and do us a favor and right-click: Script out the 'Create Table' for all table(s) involved and paste into this question.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
johnson1Author Commented:
I get 1500 rows in 00:00:00 seconds when I select top 1500 rows like this

select top 1500 * from MyTable

If I search for 1540 top rows

select top 1540 * from MyTable it runs for 10 seconds before I stop it.
It returns 1500 rows right away but after that no more.

I have been using this table for a long time and never had a problem with it until now.
0
johnson1Author Commented:
Here is the table

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[MyTable](
      [MyId] [int] IDENTITY(1,1) NOT NULL,
      [MyText] [varchar](max) NULL,
      [PId] [int] NULL,
      [YearId] [int] NULL,
      [DateCreated] [datetime] NULL,
      [CreatedBy] [int] NULL,
      [Shortname] [varchar](10) NULL,
 CONSTRAINT [PK_s_Class] PRIMARY KEY CLUSTERED
(
      [MyId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[MyTable]  WITH CHECK ADD  CONSTRAINT [FK_MyTable_s_Payer] FOREIGN KEY([PId])
REFERENCES [dbo].[s_Payer] ([PId])
GO

ALTER TABLE [dbo].[MyTable] CHECK CONSTRAINT [FK_MyTable_s_Payer]
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Some text' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MyTable'
GO
0
johnson1Author Commented:
I am not sure why but now it works.
Maybe I was running some query at the table. I closed all sql windows and then it worked:-)
0
PortletPaulfreelancerCommented:
which column was added?

have you tried to update statistics for that table?

is there any ORDER BY involved in your TOP 1500 or 1540 queries?

& just curious: is it really called [MyTable]?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.