PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → DB table with a lot of records
DB table with a lot of records
Iniciado por antonino.neri, 09,feb. 2012 14:49 - 5 respuestas
Publicado el 09,febrero 2012 - 14:49
Hello everyone!

I need to manage DB tables (*.FIC files) with a lot of records, I am talking about 1.000.000 records more or less.
When I attempt to filter on a specific column using WDMAP then it takes a lot of time because, for example, before searching for a particular record it sorts all the records in the table according to that specific key. With so many records WDMAP crashes very often. So instead of linking a table of my application with this file I wanted to fill my table application by programming browsing the file from the top to the bottom and adding each record to the table with TableAddLine. Unfortunately with so many records it takes a long time too.

Can someone suggest a method to manage big tables in a faster way?


Kindest Regards
Antonino
Miembro registrado
96 mensajes
Publicado el 11,febrero 2012 - 06:21
Hi

You will need to create a query and fill your table programatically.

You will need to ask yourself .. Why do i display these records to the computer operator? There really is no need to display even a fraction of that records at any given time.

As an example, I have a table of policies that belongs to a sales consultant. I don't display the list of policies, but opens the browse window with a blank table, and allows the agent to either type in a full or partial policy number, or a surname or Identity number and then run a query on the information he entered. This brings my record count from >600K to normally less than 10.

Kind Regards
Ben

--
Ben
Publicado el 13,febrero 2012 - 10:11
Hi Riebens,

first of all I want to thank you for your time and care.

So your suggestion is to display just the data they (my customers) need to view and not all of them.
Well this could be an idea but I have to ask my customers if this solution fits their needs.
I have tried several methods, but with no success. Unfortunately WDMAP built in algorithm before performing a search in a column tries to sort the data loading them in memory and this requires a lot of time. Hope the developent guys will come up with a better solution for next releases.

My kindest regards,
Antonino
Publicado el 13,febrero 2012 - 14:44
Morning

What I did was use 2 procedures.. One runs in background to further
fill the data, and the main one sets the first set of records...

now, I also filter the data, IE try to get the user to be smart about
what they are looking for as well as how much...

but will explain a bit... I use SQL MSSQL so this is based on that but
the premise should work.

I have 3 procedures,

InitSQLStatement -- finds the records to start and fills first 100
records or so.
AutoFetch -- background process using the Automatic Timer
And FetchNextPage to get the next page of data.

you call the init first vthat will set your items, let it loop thru the
first set of rtecords and then call autofetch...

from then on, autofetch will continue to call the FetchNextSet and in
background continue to fill your table till you stop..

Andy <<Cowboy>> Stapleton
www.windevlive.com
www.ccscowboy.com








Antonino Neri wrote :
Hello everyone!

I need to manage DB tables (*.FIC files) with a lot of records, I am talking
about 1.000.000 records more or less. When I attempt to filter on a specific
column using WDMAP then it takes a lot of time because, for example, before
searching for a particular record it sorts all the records in the table
according to that specific key. With so many records WDMAP crashes very
often. So instead of linking a table of my application with this file I
wanted to fill my table application by programming browsing the file from the
top to the bottom and adding each record to the table with TableAddLine.
Unfortunately with so many records it takes a long time too.

Can someone suggest a method to manage big tables in a faster way?


Kindest Regards
Antonino
Publicado el 14,febrero 2012 - 15:08
Hi Andy,

I want to thank you for your tip.

I'll try to put your ideas together and come out with an acceptable solution!


Cheers,
Antonino
Miembro registrado
71 mensajes
Publicado el 27,septiembre 2017 - 09:49
Hello Antonino,

I wonder if and how you solved your problem because I have something similar. Would you share your solution with us?

Thank you