Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8623797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:22:10+00:00 2026-06-12T07:22:10+00:00

I have a table like a1 a2 a3 a4 ———– 1 11 21 31

  • 0

I have a table like

a1 a2 a3 a4
-----------
1  11 21 31
2  12 22 32
3  13 23 33
4  14 24 34
5  15 25 35
6  16 26 36
7  17 27 37
8  18 28 38 
9  19 29 39
10 20 30 40

What is it the best way to store it in a c sharp array, as i am reading from sql server 2008 in a stored procedure, in COLUM MAJOR ORDER?

array = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,......40

is it better to store it like ROW MAJOR ORDER?, Which one is more efficent?

array = 1, 11, 21, 31,2,12,22,32,3,13,23,24,....10,20,30,40 

I am using

SqlDataReader rdr = null;
// create a connection object
SqlConnection conn = new SqlConnection(
"Data Source=(local);Initial Catalog=Northwind;Integrated Security=SSPI");
// create a command object
SqlCommand cmd  = new SqlCommand("select * from a1,a2,a3,a4", conn);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:22:11+00:00Added an answer on June 12, 2026 at 7:22 am

    Row major order would be easier to code since records are processed row-by-row. To store it in column major order you’d have to load all of the records into a data structure in memory (DataTable?) and loop over it for each column.

    However, without knowing the purpose of storing in on one vector, if the values are in the order you show of it it’s just dummy data, etc. it’s hard to give a definitibe answer on what’s more “efficient”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have table like server(id,name,ip) . When I'm trying to sort results by name,
I have table like this -> http://jsfiddle.net/jurisKaste/FvgeQ/ And I need to get array of
I have problem with sql query. For example, I have table like this: ID
I have table like this : ID Name_1 Name_2 Name_3 1 Egon Spengler Ives
I have a table like this ID Name IsDeleted 1 Yogesh Null 2 Goldy
I have a table like this : +-------+------------+------+-----+---------+-------+ | Field | Type | Null
I have a table like the following: RuleStep StepID | Step Property | Step
I have a table like this: ID country ------------- 1 US 2 Japan 3
I have a table like so; id1 id2 1 1 2 1 1 2
I have a table like below: Table A ---------- ID Field1 Field2 Field3 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.