Hello,
  We are using jbase 5.11.43. We have a table called FBNK.PARTY, which
contains people information. In order to search easily, we have created an
attribute QUERY.FIELD as follows:

    QUERY.FIELD
001 I
002 @ID:"*":MANUAL.NAME
003
004 QUERY.FIELD
005 80L
006 S
007
008
009
010
011
012
013
014 @ID:"*":MANUAL.NAME

In order to speed up the search we have created an index over the field
QUERY.FIELD

jsh miapre02 ~ -->LIST-INDEX FBNK.PARTY
INDEX definitions for file FBNK.PARTY at 15:33:01  26 JUL 2019

                              PAGE    1

INDEX NAME    LOCALE NAME    SORT KEYS.    LOOKUP....    INDEX
DEFINITION...................

PTY.LEGAL.    C              AL                          BY 28
ID
QUERY.FIEL    C              AL                          BY-AL
ITYPE(\@ID:"*":MANUAL.NAME\)
D

 2 Records Listed

jsh miapre02 ~ -->

If we use that query field, the lookup is pretty quick

jsh miapre02 ~ -->time COUNT FBNK.PARTY WITH QUERY.FIELD LIKE '...20899...'

 1 Records counted

usr: 0.18   sys: 0.02   elapsed: 0m0.20s
jsh miapre02 ~ -->

But if we add the clause SAMPLE, in order to limit the number of records to
return, it slows down the query,

jsh miapre02 ~ -->time COUNT FBNK.PARTY WITH QUERY.FIELD LIKE '...20899...'
SAMPLE 15

 1 Records counted

usr: 3.88   sys: 1.68   elapsed: 0m5.57s
jsh miapre02 ~ -->
jsh miapre02 ~ -->

Is there any way to avoid that?

Thank you

JL

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/CAHB4ARud9F-6gUG8O1geg2%3DQbm2Pq5YS-TH1-hcV%3D6kR2kAvTg%40mail.gmail.com.

Reply via email to