Re: Sequential search of indexed field

2019-08-16 Thread Pat Bensky via 4D_Tech
I deleted the index file and recreated it, and now it works as expected :)

PB

On Thu, 15 Aug 2019 at 21:09, John DeSoi via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Seems way off. Are the values unique or clustered around a few values?
>
> I'm seeing a few milliseconds to search 46 million records with a unique
> index value.
>
> Have you tried DESCRIBE QUERY EXECUTION?
>
> John DeSoi, Ph.D.
>
> > On Aug 15, 2019, at 2:26 PM, Pat Bensky via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > There are a lot of records in the table (about 1.3 million).
> >
> > Does this seem right? 70 seconds is a long time :) And why does it say
> it's
> > doing a *sequential* search?
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Sequential search of indexed field

2019-08-15 Thread John DeSoi via 4D_Tech
Seems way off. Are the values unique or clustered around a few values?

I'm seeing a few milliseconds to search 46 million records with a unique index 
value.

Have you tried DESCRIBE QUERY EXECUTION?

John DeSoi, Ph.D.

> On Aug 15, 2019, at 2:26 PM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> There are a lot of records in the table (about 1.3 million).
> 
> Does this seem right? 70 seconds is a long time :) And why does it say it's
> doing a *sequential* search?

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Sequential search of indexed field

2019-08-15 Thread Pat Bensky via 4D_Tech
Using v17.
I need to find out if a certain entry exists in a large table. The search
is conducted on an indexed field (longint).

I've tested with two methods:
a) Query

*SET QUERY DESTINATION*(Into variable;$iCount)

*QUERY*(*Table*($iTableNumber)->;$FieldPtr->=[TableTemplates]RecordNumber)
 - query takes 66 seconds

b) Find in field
*Find in field*($FieldPtr->;[TableTemplates]RecordNumber)
- takes 70 seconds

(no match is found)
It makes very little difference what type of index is selected for the
field.

There are a lot of records in the table (about 1.3 million).

Does this seem right? 70 seconds is a long time :) And why does it say it's
doing a *sequential* search?

Pat

-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**