![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, Are there any limits active lists generated by a SELECT? I'm thinking about things like number of items, overall size and so on. I know in BASIC a dynamic array starts to bog things down when it goes over a few thousand attributes. I'm wondering if the same thing holds true with the way active lists get built in memory and of course where the wall is on max limits. Thanks in advance, Tedd Disk space? |
#3
| |||
| |||
|
|
Hi all, Are there any limits active lists generated by a SELECT? I'm thinking about things like number of items, overall size and so on. I know in BASIC a dynamic array starts to bog things down when it goes over a few thousand attributes. I'm wondering if the same thing holds true with the way active lists get built in memory and of course where the wall is on max limits. Thanks in advance, Tedd |

#4
| |||
| |||
|
#5
| |||
| |||
|
| Tedd Scofield wrote: Hi all, Are there any limits active lists generated by a SELECT? I'm thinking about things like number of items, overall size and so on. I know in BASIC a dynamic array starts to bog things down when it goes over a few thousand attributes. I'm wondering if the same thing holds true with the way active lists get built in memory and of course where the wall is on max limits. Thanks in advance, Tedd Disk space? Yep, thats about it, at least on D3. I am sure Mr. Brown can give insite |
#6
| |||
| |||
|
|
"Tedd Scofield" <tedd_scofield (AT) hotmail (DOT) com> wrote: Hi all, Are there any limits active lists generated by a SELECT? From Tony G: One of the reasons dynamic arrays start bogging down as they get larger is that a reference to an attribute causes a scan from the beginning of the item all the way down to correct "attribute mark count". So if you go atb 4985 to 4986, you're not going down one atb, you're going down 4986. |
|
IIRC an internal select list is not like this, and D3 maintains an index to the current ID. Note however that in generating the list, you're still going to traverse frames through overflow as you build X thousands or millions of ID's. I'm not sure how that plays with RAM usage but since lists are flushed to disk out of overflow I'm assuming your entire list is going to hit memory too. Now, that is only for Execute "Select..." and none of that applies with a BASIC SELECT statement. ![]() In that case you're setting up a pointer to item ID's directly on disk, and not actually building a list in memory. So if you can work with a hashed file, there's virtually no footprint. If you need to work with sorted lists, then try working with Indexes and then use root/key to traverse the list in sorted order - it's much less painful than building the list every time. HTH. T |
#7
| |||
| |||
|
|
Thanks for the info in that reply Tony. I've used key/root before and it was real quick but I'm actually thinking about something a little different. "Note however that in generating the list, you're still going to traverse frames through overflow as you build X thousands or millions of ID's. I'm not sure how that plays with RAM usage but since lists are flushed to disk out of overflow I'm assuming your entire list is going to hit memory too." This is what I am curious about, how that list is built and handled. I've only recently grokked the trick of using SELECT and dictionaries to load the active list with correlated data =) |
#8
| |||
| |||
|
|
Goo'day, On Fri, 22 Apr 2005 16:25:57 -0700, Tony Gravagno g6q3x9lu53001 (AT) sneakemail (DOT) com.invalid> wrote: |
|
What's wrong with always playing with the "first cab off the rank" of the list and deleting/removing the 1st item on the list as you've finished with it? Is there an overhead in squashing the remiander of the list upwards vs traversing down the list for the next attribute? |
|
If the list needs to be "reused", couldn't it be saved somewhere/how and retrieved again when required..... |
#9
| |||
| |||
|
|
Hi all, Are there any limits active lists generated by a SELECT? I'm thinking about things like number of items, overall size and so on. I know in BASIC a dynamic array starts to bog things down when it goes over a few thousand attributes. I'm wondering if the same thing holds true with the way active lists get built in memory and of course where the wall is on max limits. Thanks in advance, Tedd |
#10
| |||
| |||
|
|
Bruce Nichol wrote: What's wrong with always playing with the "first cab off the rank" of the list and deleting/removing the 1st item on the list as you've finished with it? Is there an overhead in squashing the remiander of the list upwards vs traversing down the list for the next attribute? There's one hell of an overhead. The machine spend all its time moving the variable into temp string space and manipulating it. Better to traverse the dynamic array than that. |
|
Of course, it's also possible to SELECT a dynamic array to a list vbl if that's what you want to do. Just us a string vbl where you would normally put the file vbl. Another neat little trick. |

|
Then of course, you have the REMOVE statement, which avoid the need for scanning. REMOVE was initially a PR1ME Information construct, but most implementations now seem to have it. I don't know about mvEnterprise of mvBASE, but certainly U2, D3 and jBASE have it. |

![]() |
| Thread Tools | |
| Display Modes | |
| |