• 'faster' alternative to set filter to

    From timepro timesheet@21:1/5 to All on Wed Jan 25 01:27:43 2023
    in a server/client environment, is there a 'faster' alternative to 'set filter to'
    e.g.
    on a 18900 rec size .dbf (39 fields), when i code for generating a report:
    set filt to field1=&abc .and. field7='C'.and.!dele().and.field8<invdate
    go top
    do whil !eof()
    ...
    ...
    ...
    skip
    end
    -it slows down the process when 'skipping' records (or even at dbedit)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Claude Roettgers@21:1/5 to timec...@gmail.com on Wed Jan 25 01:38:26 2023
    timec...@gmail.com schrieb am Mittwoch, 25. Januar 2023 um 10:27:44 UTC+1:
    in a server/client environment, is there a 'faster' alternative to 'set filter to'
    e.g.
    on a 18900 rec size .dbf (39 fields), when i code for generating a report: set filt to field1=&abc .and. field7='C'.and.!dele().and.field8<invdate
    go top
    do whil !eof()
    ...
    ...
    ...
    skip
    end
    -it slows down the process when 'skipping' records (or even at dbedit)

    copy to xxx.dbf for field1=&abc .and. field7='C'.and.!dele().and.field8<invdate And then no need for filter anymore.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Wed Jan 25 10:55:40 2023
    Il 25/01/2023 10:38, Claude Roettgers ha scritto:

    in a server/client environment, is there a 'faster' alternative to 'set filter to'
    e.g.
    on a 18900 rec size .dbf (39 fields), when i code for generating a report: >> set filt to field1=&abc .and. field7='C'.and.!dele().and.field8<invdate
    go top
    do whil !eof()
    ...
    ...
    ...
    skip
    end
    -it slows down the process when 'skipping' records (or even at dbedit)

    copy to xxx.dbf for field1=&abc .and. field7='C'.and.!dele().and.field8<invdate
    And then no need for filter anymore.

    Or build a temporary index with FOR clause on the fly.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From timepro timesheet@21:1/5 to Enrico Maria Giordano on Wed Jan 25 02:37:39 2023
    On Wednesday, January 25, 2023 at 3:25:42 PM UTC+5:30, Enrico Maria Giordano wrote:
    Il 25/01/2023 10:38, Claude Roettgers ha scritto:

    in a server/client environment, is there a 'faster' alternative to 'set filter to'
    e.g.
    on a 18900 rec size .dbf (39 fields), when i code for generating a report: >> set filt to field1=&abc .and. field7='C'.and.!dele().and.field8<invdate
    go top
    do whil !eof()
    ...
    ...
    ...
    skip
    end
    -it slows down the process when 'skipping' records (or even at dbedit)

    copy to xxx.dbf for field1=&abc .and. field7='C'.and.!dele().and.field8<invdate
    And then no need for filter anymore.
    Or build a temporary index with FOR clause on the fly.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg
    emg:
    i have multiple index files on that dbf
    -also, in dbedit, 'all' the 'non-filtered' records will also be listed/displayed...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From timepro timesheet@21:1/5 to Claude Roettgers on Wed Jan 25 02:35:28 2023
    On Wednesday, January 25, 2023 at 3:08:28 PM UTC+5:30, Claude Roettgers wrote:
    timec...@gmail.com schrieb am Mittwoch, 25. Januar 2023 um 10:27:44 UTC+1:
    in a server/client environment, is there a 'faster' alternative to 'set filter to'
    e.g.
    on a 18900 rec size .dbf (39 fields), when i code for generating a report: set filt to field1=&abc .and. field7='C'.and.!dele().and.field8<invdate
    go top
    do whil !eof()
    ...
    ...
    ...
    skip
    end
    -it slows down the process when 'skipping' records (or even at dbedit)
    copy to xxx.dbf for field1=&abc .and. field7='C'.and.!dele().and.field8<invdate
    And then no need for filter anymore.
    but, i have multiple index files on that .dbf, and i also change indexord in the loop...
    wouldn't i then have to create multiple index files also on 'xxx.dbf'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rafa Pabd@21:1/5 to All on Thu Jan 26 07:37:59 2023
    El jueves, 26 de enero de 2023 a las 16:23:22 UTC+1, dlzc escribió:
    Dear timec...

    On Wednesday, January 25, 2023 at 3:35:29 AM UTC-7, timec...@gmail.com wrote:
    ...
    -it slows down the process when 'skipping' records
    (or even at dbedit)
    copy to xxx.dbf for field1=&abc .and. field7='C'.and. !dele().and.field8<invdate
    And then no need for filter anymore.
    ...
    but, i have multiple index files on that .dbf, and i also
    change indexord in the loop... wouldn't i then have to
    create multiple index files also on 'xxx.dbf'
    Use DBFCDX, and you have only a single index file, but multiple orderbags in that file. Yes, you'd still need to create each index, just refer to them by their alias.

    If you have the "correct" index in place when you make the copy, then it will be in that order when you make it.

    Another option is to create a separate "pointer file" that has records for matches into your main file, with fields associated with index position in each of your orderbags. Then build indexes on each of those. Smaller on disk, and that is about it.

    You've complained (rightly) about the speed. We're trying to give you 'easy' fixes here. Only you can present them to the user in a fashion that allows them to feel this is faster. If you need to change indexes on main, create a new xxx.dbf to go with
    it.


    Array recnos with filter in running on Array RDD

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dlzc@21:1/5 to timec...@gmail.com on Thu Jan 26 07:23:21 2023
    Dear timec...

    On Wednesday, January 25, 2023 at 3:35:29 AM UTC-7, timec...@gmail.com wrote: ...
    -it slows down the process when 'skipping' records
    (or even at dbedit)
    copy to xxx.dbf for field1=&abc .and. field7='C'.and. !dele().and.field8<invdate
    And then no need for filter anymore.
    ...
    but, i have multiple index files on that .dbf, and i also
    change indexord in the loop... wouldn't i then have to
    create multiple index files also on 'xxx.dbf'

    Use DBFCDX, and you have only a single index file, but multiple orderbags in that file. Yes, you'd still need to create each index, just refer to them by their alias.

    If you have the "correct" index in place when you make the copy, then it will be in that order when you make it.

    Another option is to create a separate "pointer file" that has records for matches into your main file, with fields associated with index position in each of your orderbags. Then build indexes on each of those. Smaller on disk, and that is about it.

    You've complained (rightly) about the speed. We're trying to give you 'easy' fixes here. Only you can present them to the user in a fashion that allows them to feel this is faster. If you need to change indexes on main, create a new xxx.dbf to go with
    it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From timepro timesheet@21:1/5 to All on Thu Jan 26 21:08:55 2023
    On Thursday, January 26, 2023 at 8:53:22 PM UTC+5:30, dlzc wrote:
    thanks dlzc.
    back to old dog...new tricks...
    -it never ends.

    btw: does chanting 'abracadabra' work.

    Dear timec...

    On Wednesday, January 25, 2023 at 3:35:29 AM UTC-7, timec...@gmail.com wrote:
    ...
    -it slows down the process when 'skipping' records
    (or even at dbedit)
    copy to xxx.dbf for field1=&abc .and. field7='C'.and. !dele().and.field8<invdate
    And then no need for filter anymore.
    ...
    but, i have multiple index files on that .dbf, and i also
    change indexord in the loop... wouldn't i then have to
    create multiple index files also on 'xxx.dbf'
    Use DBFCDX, and you have only a single index file, but multiple orderbags in that file. Yes, you'd still need to create each index, just refer to them by their alias.

    If you have the "correct" index in place when you make the copy, then it will be in that order when you make it.

    Another option is to create a separate "pointer file" that has records for matches into your main file, with fields associated with index position in each of your orderbags. Then build indexes on each of those. Smaller on disk, and that is about it.

    You've complained (rightly) about the speed. We're trying to give you 'easy' fixes here. Only you can present them to the user in a fashion that allows them to feel this is faster. If you need to change indexes on main, create a new xxx.dbf to go with
    it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan@21:1/5 to All on Fri Jan 27 10:42:19 2023
    Il 27/01/2023 06:08, timepro timesheet ha scritto:
    On Thursday, January 26, 2023 at 8:53:22 PM UTC+5:30, dlzc wrote:
    thanks dlzc.
    back to old dog...new tricks...
    -it never ends.

    btw: does chanting 'abracadabra' work.

    BTW: keep in mind: traversating a dbf *with an index active* can be 10
    times slower than with no indexes.

    use dbf1
    set index to ix1
    go top
    do while .not. eof()
    skip
    enddo

    set index to
    go top
    do while .not. eof()
    skip
    enddo
    the latter is MUCH faster (obviously).

    Dan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dlzc@21:1/5 to timec...@gmail.com on Fri Jan 27 07:11:49 2023
    On Thursday, January 26, 2023 at 10:08:57 PM UTC-7, timec...@gmail.com wrote:
    On Thursday, January 26, 2023 at 8:53:22 PM UTC+5:30, dlzc wrote:
    thanks dlzc.
    back to old dog...new tricks...
    -it never ends.

    btw: does chanting 'abracadabra' work.

    If you speak the language, yes it does. That advice was English, but I expected you wanted to UNDERSTAND, not have someone write the code for you.

    I'll stop responding to your posts.

    David A. Smith

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From timepro timesheet@21:1/5 to dlzc on Fri Jan 27 08:15:53 2023
    On Friday, January 27, 2023 at 8:41:50 PM UTC+5:30, dlzc wrote:
    On Thursday, January 26, 2023 at 10:08:57 PM UTC-7, timec...@gmail.com wrote:
    On Thursday, January 26, 2023 at 8:53:22 PM UTC+5:30, dlzc wrote:
    thanks dlzc.
    back to old dog...new tricks...
    -it never ends.

    btw: does chanting 'abracadabra' work.
    If you speak the language, yes it does. That advice was English, but I expected you wanted to UNDERSTAND, not have someone write the code for you.

    I'll stop responding to your posts.

    David A. Smith
    whoa...whoa...
    david, you overthink...
    i bet, sans you all others believed (rightly) it was in jest...(abracadabra). 'i'll stop responding...' whatever man, but thanks for all your earlier inputs/responses. some really enlightened me.

    furthermore, 'have someone write the code for me'. yeah, so what?. nothing remiss if i can get it done 'professionally' from an expert in this forum.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From timepro timesheet@21:1/5 to Dan on Thu Apr 6 09:11:58 2023
    On Friday, January 27, 2023 at 3:12:25 PM UTC+5:30, Dan wrote:
    Il 27/01/2023 06:08, timepro timesheet ha scritto:
    On Thursday, January 26, 2023 at 8:53:22 PM UTC+5:30, dlzc wrote:
    thanks dlzc.
    back to old dog...new tricks...
    -it never ends.

    btw: does chanting 'abracadabra' work.

    BTW: keep in mind: traversating a dbf *with an index active* can be 10
    times slower than with no indexes.

    use dbf1
    set index to ix1
    go top
    do while .not. eof()
    skip
    enddo

    set index to
    go top
    do while .not. eof()
    skip
    enddo
    the latter is MUCH faster (obviously).

    Dan
    yeah dan, i tried it out without any .ntx and it definitely did browse/scroll/search faster in dbedit()
    but, does it have to be zero index files -or- lesser the ntx faster the scrolling...
    (or, no. of ntx does not matter. same speed with 5 ntx or 1 ntx)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From timepro timesheet@21:1/5 to timepro timesheet on Thu Apr 6 21:09:53 2023
    On Thursday, April 6, 2023 at 9:42:01 PM UTC+5:30, timepro timesheet wrote:
    On Friday, January 27, 2023 at 3:12:25 PM UTC+5:30, Dan wrote:
    Il 27/01/2023 06:08, timepro timesheet ha scritto:
    On Thursday, January 26, 2023 at 8:53:22 PM UTC+5:30, dlzc wrote:
    thanks dlzc.
    back to old dog...new tricks...
    -it never ends.

    btw: does chanting 'abracadabra' work.

    BTW: keep in mind: traversating a dbf *with an index active* can be 10 times slower than with no indexes.

    use dbf1
    set index to ix1
    go top
    do while .not. eof()
    skip
    enddo

    set index to
    go top
    do while .not. eof()
    skip
    enddo
    the latter is MUCH faster (obviously).

    Dan
    yeah dan, i tried it out without any .ntx and it definitely did browse/scroll/search faster in dbedit()
    but, does it have to be zero index files -or- lesser the ntx faster the scrolling...
    (or, no. of ntx does not matter. same speed with 5 ntx or 1 ntx)
    the striking reduction in speed (due to multiple .ntx) in dbedit scroll/browse happens only in client systems not on the server.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)