Sam Hobbs
posted
6490 posts
since
Sep 07, 2009
from
Los Angeles, California, USA
|
|
Re: SQL server 2008: Selecting over a million records
|
|
|
|
|
|
|
|
|
|
|
It depends on what you need to do. The best performance would be a class that provides only forward-only access to a single table in any order (not sorted).
|
|
|
|
|
Thinking is a feeling; pleasant for some and unpleasant for others.
|
|
|
|
|
|
Darnell Dudley
posted
616 posts
since
Feb 20, 2010
from
|
|
Re: SQL server 2008: Selecting over a million records
|
|
|
|
|
|
|
|
|
|
|
Is C# the right language to handle this with performance, I am doing some research I am hearing that, a native language like c , c++ will be much faster, whats your opinion Sam? I am still learning.
|
|
|
|
|
|
Sam Hobbs
posted
6490 posts
since
Sep 07, 2009
from
Los Angeles, California, USA
|
|
Re: SQL server 2008: Selecting over a million records
|
|
|
|
|
|
|
|
|
|
|
C# provides good or excellent performance for most things and I assume C# is good for whatever you are doing. If the people saying that C++ is significantly faster are people that are experienced with C++ but not C# then of course you must be skeptical of what they say.
|
|
|
|
|
Thinking is a feeling; pleasant for some and unpleasant for others.
|
|
|
|
|
|
Darnell Dudley
posted
616 posts
since
Feb 20, 2010
from
|
|
Re: SQL server 2008: Selecting over a million records
|
|
|
|
|
|
|
|
|
|
|
From they were saying that c sharp has to run though and interpreter which will take time, but since c, c++ is a native language it skips that interpreter process, I need to find out what that means.
|
|
|
|
|
|
Sam Hobbs
posted
6490 posts
since
Sep 07, 2009
from
Los Angeles, California, USA
|
|
Re: SQL server 2008: Selecting over a million records
|
|
|
|
|
|
|
|
|
|
|
Anyone saying that C# is interpreted does not understand how .Net works. It is not that simple.
|
|
|
|
|
Thinking is a feeling; pleasant for some and unpleasant for others.
|
|
|
|
|
|
Suthish Nair
posted
4906 posts
since
Jul 09, 2009
from
India
|
|
Re: SQL server 2008: Selecting over a million records
|
|
|
|
|
|
|
|
|
|
|
You can introduce custom paging using stored procedures also for selecting records.
|
|
|
|
|
|
Darnell Dudley
posted
616 posts
since
Feb 20, 2010
from
|
|
Re: SQL server 2008: Selecting over a million records
|
|
|
|
|
|
|
|
|
|
|
can you point me to a tutorial using custom paging, i never really use the term custom paging, what is custom paging?
|
|
|
|
|
|
Darnell Dudley
posted
616 posts
since
Feb 20, 2010
from
|
|
Re: SQL server 2008: Selecting over a million records
|
|
|
|
|
|
|
|
|
|
Ok now that we have that clear lets make an example, say for instance we have one table and we may have to one join to pull in related data possible, I am going to make a table call Contacts. We are going to say there are a million contacts in this table. I am just a making up table representing what I am really doing, but using a contact table to communicate from. I cant go to much in detail. So we have this Contact table and also Education table below. An a customer wants to view all records or export all records to common format file like excel, csv, etc......
What would be the best architecture or should say how would design this effectively. My first take is to set up the stored procedures in SQL Server 2008 Mngt Studio etc.. I want to do this as team, this will pushing my learning when it comes to performance. First time working with a million records. This is my next learning curve
| Contact Table | | | | | | | | | | | | | | | | | ID | Fname | Lname | City | State | ZipCode | Address | PhoneNo |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| | Education Table | | | | | | | | | | | | | | | | | ID | School | Major | Classification | fk_ContactId | | | |
|
|
|
|
|
|
Sam Hobbs
posted
6490 posts
since
Sep 07, 2009
from
Los Angeles, California, USA
|
|
Re: SQL server 2008: Selecting over a million records
|
|
|
|
|
|
|
|
|
|
|
I cannot say very much that can help. I assume that you will need an index for the fk_ContactId field of the Education Table. Obviously the primary key for each table will be the ID filed for each of them. So when you do a join of the two tables using the fk_ContactId field then an index will likely help very much.
|
|
|
|
|
Thinking is a feeling; pleasant for some and unpleasant for others.
|
|
|
|
|
|
Darnell Dudley
posted
616 posts
since
Feb 20, 2010
from
|
|
Re: SQL server 2008: Selecting over a million records
|
|
|
|
|
|
|
|
|
|
|
Can you send me to a good tutorial on creating indexes.
|
|
|
|
|
|