Click here to Skip to main content
14,603,886 members
Rate this:
Please Sign up or sign in to vote.

I have developed a desktop application in C# that uses Sql Server 2005 express edition to store data.

The database server works fine with small size of data, but now I have more than 10,000 entries in a table, and when I fetch data from this table it takes quite a lot of time.

Also I have created a view on this table which contains some subqueries.
This view is not opening with this data size, and sql server is returning "time out expiration" error.

I do not understand why server is behaving like this with this size of data, after all it is a server.

I have 2.8 processor with 1 GB of RAM.

If someone have knowledge about this issue please tell me.
Updated 7-Jun-10 22:06pm
Dalek Dave 8-Jun-10 4:07am
Edited for readability and syntax
Rate this:
Please Sign up or sign in to vote.

Solution 1

Just because you label it a server doesn't mean it's one.
1GB of ram is very very low these days.
Without seeing your SQL statements there isn't much we can do to help.

Look into indexing.

Use INNER JOIN's where possible (instead of LEFT / RIGHT OUTER JOIN's)

If you take out the sub queries in the view does it work then?
Rate this:
Please Sign up or sign in to vote.

Solution 2

Yes it works if i remove subqueries but still very slow and i am also using inner joins in the view.
Tom Deketelaere 8-Jun-10 7:38am
use the comment feature to reply to a answer

Then all you can do is index the right columns and or add some more ram and see if that helps

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100