Mailing List Archive



Back to the month index Back to the list index

pti@mail.net4all.be
Tue, 3 Sep 1996 08:38:32 +0000


From: pti@mail.net4all.be
Date: Tue, 3 Sep 1996 08:38:32 +0000
Subject: [mSQL] Insert slowdown using msql
Message-Id: <06381837900244@net4all.be>

Hello,

I have made a little test about the slowdown which got noticed on
certain systems. Actually I was only interested in the application I
was thinking of, and made a single table using :

CREATE TABLE test2(
      vkey int primary key,
      val1 char(15),
      val2 real
       )
    ...

then I started inserting records. The keys are incremented. These are the results : the time in
ms for an insert in function of the number of records inserted (in
thousands)

140 ++--+---+---+---+---+--+---+---+---+--++
        + + + + + + + + + + +
    120 ++ "sirslt-3.txt" A AA
        | AAAA|
        | AAAA |
    100 ++ AAAA ++
        | AAA |
     80 ++ AAAA ++
        | AAA |
        | AAA |
     60 ++ AAAA ++
        | AAAA |
     40 ++ AAAA ++
        | AAAA |
        | AA |
     20 AAAA ++
        + + + + + + + + + + +
      0 ++--+---+---+---+---+--+---+---+---+--++
        0 10 20 30 40 50 60 70 80 90 100

If you have a fixed-width font, you'd see a straight line. I would
have expected a log type line.

This is bad news, since now inserting records (in my case) is an
O(n^2) operation. I would have expected O(nlogn) or even O(k*n).

Has anybody an idea what's going on? (Worst case situation in search
algorithm?) What can I do about it?

TIA

Peter Tillemans

Has anybody an idea

--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!