Can you disable indexes temporarily in 4D v13.5?

Keisuke Miyako (6/4/14 12:06AM)
Keith Goebel (6/4/14 12:34AM)
Timothy Penner (6/4/14 1:05AM)
Keith Goebel (6/5/14 9:05AM)


Keisuke Miyako (6/4/14 12:06 AM)

PAUSE INDEXES is ?=A2?=82¨=C5ìmainly useful when you are
importing or modifying
large
amounts of data in tables that have several indexes?=A2?=82¨=C2ù,
i.e. its
selling
point is that it is a per-table operation as opposed to ALTER DATABASE
DISABLE INDEXES which applies to the whole database.

I think the idea is that with the new command,
you can make better use of the cache memory by pausing-resuming
indexing
for each table during a procedural import of large amount of data sets
into several tables.

otherwise,
if indexing is turned on for all tables at once,
the index builder might use lots of memory.

miyako

On 2014/06/03 22:41, "Douglas von Roeder" <dvonroeder@...
wrote:

color><param>00000,0000,DDEE/param>KKeith:

The Pause Index command in V14 is labeled as "New"
/color>

Keith Goebel (6/4/14 12:34 AM)

Hi all.
Using 4D v13.5 Win, we have a table that currently contains just over
12 million records, and we are looking to ramp up its use, so there
will eventually be many times that.

Each batch of records is imported using custom import code (once usage
is ramped up, each import batch size will probably vary from 300k to 2
million or more).

The import checks only the first new record using 4D queries, and then
checks using variables from there on.

The problem is the indexes...
The table has only 16 fields.
3 of these are not used, and have been set to Text.
Of the rest, 5 are indexed (1 x date, 3 x longint, 1 x alpha 49).

The ideal solution is to
1) use indexes on first import pass
2) suspend index updating
3) "release" the indexes to integrate the new values after import
completion

I have tried deleting the indexes (1) and then creating them after the
import has completed (3), but the index rebuild takes too long.

I have checked the KB and 4D v13.5 Lang Ref and not found anything
that seems to do what I need.

Any and all ideas are welcomed...
Cheers, KG

Timothy Penner (6/4/14 1:05 AM)

Do these help?
http://kb.4d.com/assetid=76873
http://doc.4d.com/4Dv12.1/help/Title/en/page865.html

-Tim

-----Original Message-----

I have checked the KB and 4D v13.5 Lang Ref and not found anything
that seems to do what I need.

Keith Goebel (6/5/14 9:05 AM)

Steve,

color><param>00000,0000,DDEE/param>CCan you execute the commands from
a method that is set to execute on server?
/color>
I don't know.
The docs only say ""Note: This command cannot be executed from a 4D
Remote."
I hope 4D will have clarified its use by the time we are ready to
upgrade to v14.
Cheers, Keith

Reply to this message

Summary created 6/5/14 at 6:20AM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com