Large List Sorting

Hello, All!

Have a problem. I'm developing an application which reading a large database
file (DBF) and displaying it in the list control. Because of the size of the
file (>15 MB, later it will be increased) I'm using a virtual list (owner
data).

But now I need to sort data in the list. AFAIK to perfirm this I should read
the whole file. In this case my program starts several minutes!!! It doesn't
have to be like this [(C) Pink Floyd]...

Is there any methods to load a large amount of data as quickly as possible?
Or I just should humble, 'cause sorting of large amount of data cannot be
performed in seconds?

WMP is now playing: Nino Rota - Love Theme Goodfather

....Don't give in without a fight...

With best regards, William Mahoney.


0
wilmahoney (25)
10/1/2003 4:11:24 PM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
616 Views

Similar Articles

[PageSpeed] 49

William,
	Do the list control contents need to be displayed immediately upon 
startup?  What I've done in the past is load the app without filling the 
control.  Launch a worker thread to fill the list in the background 
while still letting the app be responsive, then display the list once it 
has been completely read and sorted.
	This may not work for you, but I thought I'd at least suggest it.

In article <ep5uXdDiDHA.944@TK2MSFTNGP11.phx.gbl>, William Mahoney 
says...
> Hello, All!
> 
> Have a problem. I'm developing an application which reading a large database
> file (DBF) and displaying it in the list control. Because of the size of the
> file (>15 MB, later it will be increased) I'm using a virtual list (owner
> data).
> 
> But now I need to sort data in the list. AFAIK to perfirm this I should read
> the whole file. In this case my program starts several minutes!!! It doesn't
> have to be like this [(C) Pink Floyd]...
> 
> Is there any methods to load a large amount of data as quickly as possible?
> Or I just should humble, 'cause sorting of large amount of data cannot be
> performed in seconds?
> 
> WMP is now playing: Nino Rota - Love Theme Goodfather
> 
> ...Don't give in without a fight...
> 
> With best regards, William Mahoney.
> 
> 
> 
0
10/2/2003 1:58:50 AM
"William Mahoney" <wilmahoney@mail333.com> wrote in message
news:ep5uXdDiDHA.944@TK2MSFTNGP11.phx.gbl...
> Hello, All!
>
> Have a problem. I'm developing an application which reading a large
database
> file (DBF) and displaying it in the list control. Because of the size of
the
> file (>15 MB, later it will be increased) I'm using a virtual list (owner
> data).
>
> But now I need to sort data in the list. AFAIK to perfirm this I should
read
> the whole file. In this case my program starts several minutes!!! It
doesn't
> have to be like this [(C) Pink Floyd]...
>
> Is there any methods to load a large amount of data as quickly as
possible?
> Or I just should humble, 'cause sorting of large amount of data cannot be
> performed in seconds?

Add an index to the database for the field you intend to sort on. Read the
database using that index.

Cheers
Richard.


0
10/2/2003 2:10:44 AM
I'd suggest creating a suitable .ndx file and filling the control relative to the .ndx
file. Use your same virtual techniques, but don't access the file sequentially.
					joe

On Wed, 1 Oct 2003 20:11:24 +0400, "William Mahoney" <wilmahoney@mail333.com> wrote:

>Hello, All!
>
>Have a problem. I'm developing an application which reading a large database
>file (DBF) and displaying it in the list control. Because of the size of the
>file (>15 MB, later it will be increased) I'm using a virtual list (owner
>data).
>
>But now I need to sort data in the list. AFAIK to perfirm this I should read
>the whole file. In this case my program starts several minutes!!! It doesn't
>have to be like this [(C) Pink Floyd]...
>
>Is there any methods to load a large amount of data as quickly as possible?
>Or I just should humble, 'cause sorting of large amount of data cannot be
>performed in seconds?
>
>WMP is now playing: Nino Rota - Love Theme Goodfather
>
>...Don't give in without a fight...
>
>With best regards, William Mahoney.
>

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
10/2/2003 3:18:31 AM
Hello, Richard!
You wrote  on Thu, 02 Oct 2003 02:10:44 GMT:

 r> Add an index to the database for the field you intend to sort on.
 r> Read the database using that index.

But the first launch of the program will be slow anyway :-(
But it seems to be inevitable. Thanks for the idea of the index. It will
increase the performance during normal using of the program.

WMP is dead...

....Don't give in without a fight...

With best regards, William Mahoney.








0
wilmahoney (25)
10/2/2003 4:03:34 PM
Reply:

Similar Artilces:

Outlook 2003 Imap Auto Purge wish list
I hope someone at Microsoft can code in a auto purge Imap deleted email function into there next Service Pack. I can see a problem rolling this out to our employees. There going to delete messages and those messages are going to stay on the Email server until they do a Purge. I'm afraid they just won't do this. We use Imap. No auto purge means emails staying on the server which over time just takes up hard drive space and makes tape backups take longer. wayne Hi Wayne, You should send suggestions to mswish@microsoft.com as the newsgroups are not monitored for feature request...

Sort behaves unexpectedly
Over the years I've come to count on being able to sort be a column header. That is, all of the rows below the headers have data and at least two rows above the headers are empty. I have a spreadsheet now where rows 1, 2 and 3 have random info in them. Rows 4 and 5 are empty. Row six has column labels, and rows 7-45 have data. If I put my cursor on one of the headers (e.g., "name"), and click sort a/z, it sorts only the rows in the group, but it sorts the header row into the rest of them. Rows 1-3 aren't affected. How come? I've never had this happen before. ...

Sending multiple Emails so each person does not get the list
We want to send out multiple emails to several email accounts. We dont want the accounts to see the list of accounts that the email went to. How does one do this in Outlook? In any contacts folder, Tools | Mail Merge is the best choice. --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx =20 "tom" <Spamblocker@ameritech.net> wrote in message = ...

Command Button to Sort and Filter by Selection
Is it possible to create a command button on a form that will allow you to sort records or to use the Filter by Selction option? They are not choices I can select while using the wizard or the macro builder. However, both of these would be extremely useful as I'm building a database for someone who has never used a database before and isn't all that comfortable with computers in general. I am using Access 2003 and I am NOT familiar with Access Visual Basic, Java or building macros from scratch. I'm sure there is a way to use these tools to create what I want, ...

User list
I'm wondering how to check the users on Exchange Server 2003, I tried it on E2k3 by [PS] W:\>Get-Mailbox -server Exchange2k3, and I got nothing in the list, but when I tried to remove Exchange Server 2003, I got an error, The component "Microsoft Exchange Messaging and Collaboration Services" cannot be assigned the action "Remove" because: - One or more users currently use a mailbox store on this server. These users must be moved to a mailbox store on a different server or be mail disabled before uninstalling this server. Any idea? Thanks. I followed the instruc...

How to remove locations from the drop-down list?
My drop down list for appointment locations contains a few duplicate entries, usually because one of the duplicates contains a spelling error. How can I get rid of these false entries so that I don't always have to be super-cautious to pick the correct one? M. "Michael Moser" <michael.nospam.moser@nospam.freesurf.ch> wrote in message news:DF17B5F2-DA57-48A7-B7DD-3B5A52F2A4E6@microsoft.com... > My drop down list for appointment locations contains a few duplicate > entries, usually because one of the duplicates contains a spelling error. > How ...

Large Volume of Contacts
Hi we're looking at MSCRM's capability to handle large volume of information. Roughly 20 million contact records and on the average half of these would have an average of 3 new activities associated per week.. Given that hardware won't be too much of a problem, how would performance and response time of the product be affected? You could run into some performance issues unless you are really careful about how you set sharings etc in V1.2. There is a couple of index changes and other locking related changes that would need to be made too. The sharing is important as it wil...

Distribution list #7
How do I load a distribution list into the address book under a single heading ...

edit a drop down list
Hello, I have 2 questions 1. for an existing drop down list, how can I add a new entry? That is, a list named "division" now contains 5 items, and I want to add a sixth. I've tried to highlight all 6 items and typing "division" into the name box, but that just jumps me to the original 5 names. I also tried highlighting the original 5 and deleting the "division" from the name box, but again no luck. 2. Can I enlarge the font on a drop down list, so it appears larger when the arrow is clicked? The font is very small at present. To change the name r...

Customer Mailing List
Whats the best way to output the customer mailing list so that it doesn't require the entire content to be reformatted before printing out mailing labels? If exporting to a word .doc it lumps everything up in one column. Is there a better way w/out having to virtually reformat/retype all of the customers? Thanx in advance! Rich Export as a CSV, then use Mail Merge to load the fields. -- Jason Hunt Advanced Computer Systems You can use word mail merge to directly link to the database. No need to run a csv file. mt "Jason Hunt" <jhunt@advcs.ca> wrote in mess...

using addrress books to sort incoming mail
I use address books to sort incoming mail. An odd thing: depending on how the sender's name comes across, it doesn't get caught by the filter (amd moved to the "Family Mail" Folder I have set up. for example: my mom and dad's email (from momanddad@somedomain.com) comes as from that address. However, in my contacts, they are listed by their names: John and Mary Smith, with momanddad@somedomain.com as their email address and John and Mary Smith as the display name. What have I done wrong? TIA 1. The big ONE - failed to post your version of Outlook. Rules operate at ...

multiple pick from drop-down list
Does anyone know how to setup a drop-down type (or other type) list where I could pick multiple selections from the list and have it populate each selection in a different cell? Thanks, John Drop-downs do not lend themselves to multiple selections (what should be shown in the text area when the drop-down is not dropped down? You would probably be best off using a ListBox (it supports multiple selections). Can you give a more detailed description of what you want to do? Rick "johnrb7865" <johnrb7865@discussions.microsoft.com> wrote in message news:DD85C389-6AFC-4BC1-9...

Holiday listing
How do I get Publisher 2003 to automatically add major holidays to each month? ...

Recently used file list
Does anyone know if the size of the list can be increased from the default of 9? Thanks Tools/Options/General allows you to change the recently viewed size, but is pretty clear that the maximum is 9. >-----Original Message----- >Does anyone know if the size of the list can be increased >from the default of 9? > >Thanks >. > In xl2k and xl2002 (not sure about xl97), when you do a file|open, you'll see a History button in the left hand frame. Maybe you could use that to see more. Maria wrote: > > Does anyone know if the size of the list can be increased...

MS Exchange and Server 2003
Hey, At my company we run MS server 2003 and exchange 5.5. I want to send an email with an attachment to about 7500 users. we have IBM blade server with t1 connections. we have distribution list ready to go. What i want to know is that am i taking any chances in crashing the system. will this have any effect on the server. Thanks DJ ...

row height does not move with row when sorting
When sorting a spreadsheet with rows of varying row heights, the row height setting does not move with the respective row resulting in not all data in cells being displayed or with large empty areas in others. That is correct. The rows don't move...........the data moves. Format the cells to wrap text and rows to autofit. You should see a difference. Gord Dibben MS Excel MVP On Fri, 2 Apr 2010 12:01:03 -0700, Dennis <Dennis@discussions.microsoft.com> wrote: >When sorting a spreadsheet with rows of varying row heights, the row height >setting does...

Sorting lists with references
How do a sort a list that contains references/formulas? (I want the reference to follow the row as it is "sorted around"..) Excel does't seem to want to sort a list containg formulas, it will only sort lists with numerical values.. Thanks! -- jonfu ------------------------------------------------------------------------ jonfu's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=28193 View this thread: http://www.excelforum.com/showthread.php?threadid=477281 janfu, If you want to sort based on the column of formulas, first copy the column with th...

how do I import a large amount of text into one cell?
I am trying to build a product database to upload to a new web site. I have to copy and paste descriptions fom various websites to begin with. I cannot seem to maintain orginal formats from the websites such as bullet points, etc. So can anyone tell me what the best method is for this? Also once I do have the product description, I have to paste into Excel so I can then convert to a "csv" file which is used by the web hosting service. When I paste a description into an excel cell, it covers up the entire worksheet! I know that excel can handle a few thousand characters, ...

Large Excel 2008 .xlsx file behaviour with Vista
I've found a rather odd problem with a large ... well huge ... XLSX file. I'm not sure if this ought to go under Excel or Vista ... but for now its here. The file is a single XLSX worksheet 7 columns wide but 887022 rows deep and is 38.103 MB size. It is a simple file of text, no cell has more than 10 characters, there are no macros, no formula, no graphics, no images, no formatted cells other than default, nothing, just 7 x 887022 cells with ASCII text and number. Excel does all I need it to. It works. I can search and sort and so on, thats all I need within Excel. ...

Link Drop Down list with PIVOT Table in Excel 2003
Hi I'm using MS Excel 2003 and need a solution regarding link my drop down list with my pivot table. Query : I have created a drop down list in which month can be selected and wanted to link with pivot table in which month wise team count is displayed for a selected month. Presently I'm drag n drop the month in pivot table and its shows the count. But this exercise I have to do every time when I need the report. Is it possible that I have select the month from my drop down list (created in same sheet) and pivot table shows the data related to that month. Please h...

Sorting Search Results
I there a way to sort search results to see the messages with the latest responses first? Thanks, ...

Selecting only specific rows for a Sort
OR, should I define a set of date ranges to cover the dates from the day after the last meeting to the day before the next meeting, for each Group, so that I can simply the select the date range that's appropriate for me to produce a worksheet for it (if you see what I mean)? I'd still use autofilter. (See your previous post.) mkflirting wrote: > > OR, should I define a set of date ranges to cover the dates from the day > after the last meeting to the day before the next meeting, for each Group, so > that I can simply the select the date range that's ap...

distribution List Limit
HI all, i know this is not the right place where to post but i try. Do you know if there is a limit for number of contact in outlook's distribution lists ? How many address can i put in each one ? Outlook 2003 sp3 on windows 2003 sp3 exchange 2003 sp2 thanks ...

sorting of text file
I need simple code for sorting text file alphabeticaly, line by line. I would read the whole file in to a std:vector or CStringArray and just sort the lines then write them back. If you need to sort a huge file you'll have to do it with a number of merge sort files then add then all back together into the original. This kind of class may help you get started: http://www.codeproject.com/cpp/qarray.asp Tom <petra980@gmail.com> wrote in message news:19b2153e-15a5-49cd-9f93-7d90b67f78f8@e23g2000prf.googlegroups.com... >I need simple code for sorting text file alphabeticaly, ...

Custom Default Address Lists for multiple domains
We have two domains in one exchange site so we can share free/busy and address lists. These two domans are physically two different companies so we both need seperate default address lists that contain: users, groups, public folders and contacts. I've been messing around with filters for a few weeks and have not found any that work. Can anyone give any suggestions.... we'll say the domains are abc.com and xyz.com in a Big Company exchange site. abc.com and xyz.com are in seperate networks and seperate administrative groups. Thanks for any help! ...