Most Effective way to insert into an Indexed field

Ivan Smahin ivan_smahin at paradigmasoft.com
Sat Nov 16 02:30:11 CST 2013


On Nov 14, 2013, at 2:58 AM, Chris Jones <cjones at daz3d.com> wrote:

> Hi,
> 
> I am running into a slow down when I try to insert about a 100 records into a table.  The table has only one column, a var char, and has a unique index on that column.  The test table I am working with has about 320000 records currently in it.  Also I am accessing the database as a client ( db is running as a service).
> 
> Is there a better way to do this than "AddRecord" on a table object?  I need to ensure that the inserted items are unique and quickly searchable, hence the unique index.  Thank you for any help.


One more possibility is to use row-constructor syntax:

insert into t1 VALUES (1, '1'), (2, '2') 

It means - add 2 rows at once:

1, '1'
2, '2'

-- 
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20131116/a676f373/attachment.html>


More information about the Valentina mailing list