Thanks Helen for your reply was helpful
On Thursday, May 19, 2016 4:13 AM, "Helen Borrie [email protected]
[firebird-support]" <[email protected]> wrote:
Hello lionel,
Thursday, May 19, 2016, 12:50:44 AM, you wrote:
> I use firebird 2.5.6.I just wanted to know if there is a method by which i
> can speed
> an insert query to (insert about 50000 records) into a table.Right now it is
> taking about
> 40 minutes.My front end is VBscript and i use a prepared statement.Any help
> would be
> appreciated.
A likely cause of, or contributor to, that slow performance is some
default setting in the VB driver or the ODBC driver that is forcing
auto-commit on every iteration of the INSERT statement. It is typical
of these "dumbed-down" interfaces that try to make all database
engines work to the rules of the lowest common denominator, like
Access, for example, which don't use transactions. If you find that is
the case, try to code or configure it to enclose batches of approx.
10000 inserts in one transaction.
There are separate lists for the VB driver and the ODBC driver, which
you can find in the support section of the Fb web site. If
you get stuck, you may find someone on one of those lists who has
figured out how to make this happen using the same tool set.
On the Firebird side, if the table you are inserting to has a large
number of indexes, that will slow down your bulk inserts. If this
operation is just done occasionally, you might consider setting the
indexes inactive for the duration of the run. You can write simple
DDL scripts to deactivate and reactivate indexes.
Helen
#yiv4743199500 #yiv4743199500 -- #yiv4743199500ygrp-mkp {border:1px solid
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv4743199500
#yiv4743199500ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv4743199500
#yiv4743199500ygrp-mkp #yiv4743199500hd
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}#yiv4743199500 #yiv4743199500ygrp-mkp #yiv4743199500ads
{margin-bottom:10px;}#yiv4743199500 #yiv4743199500ygrp-mkp .yiv4743199500ad
{padding:0 0;}#yiv4743199500 #yiv4743199500ygrp-mkp .yiv4743199500ad p
{margin:0;}#yiv4743199500 #yiv4743199500ygrp-mkp .yiv4743199500ad a
{color:#0000ff;text-decoration:none;}#yiv4743199500 #yiv4743199500ygrp-sponsor
#yiv4743199500ygrp-lc {font-family:Arial;}#yiv4743199500
#yiv4743199500ygrp-sponsor #yiv4743199500ygrp-lc #yiv4743199500hd {margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv4743199500
#yiv4743199500ygrp-sponsor #yiv4743199500ygrp-lc .yiv4743199500ad
{margin-bottom:10px;padding:0 0;}#yiv4743199500 #yiv4743199500actions
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv4743199500
#yiv4743199500activity
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv4743199500
#yiv4743199500activity span {font-weight:700;}#yiv4743199500
#yiv4743199500activity span:first-child
{text-transform:uppercase;}#yiv4743199500 #yiv4743199500activity span a
{color:#5085b6;text-decoration:none;}#yiv4743199500 #yiv4743199500activity span
span {color:#ff7900;}#yiv4743199500 #yiv4743199500activity span
.yiv4743199500underline {text-decoration:underline;}#yiv4743199500
.yiv4743199500attach
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}#yiv4743199500 .yiv4743199500attach div a
{text-decoration:none;}#yiv4743199500 .yiv4743199500attach img
{border:none;padding-right:5px;}#yiv4743199500 .yiv4743199500attach label
{display:block;margin-bottom:5px;}#yiv4743199500 .yiv4743199500attach label a
{text-decoration:none;}#yiv4743199500 blockquote {margin:0 0 0
4px;}#yiv4743199500 .yiv4743199500bold
{font-family:Arial;font-size:13px;font-weight:700;}#yiv4743199500
.yiv4743199500bold a {text-decoration:none;}#yiv4743199500 dd.yiv4743199500last
p a {font-family:Verdana;font-weight:700;}#yiv4743199500 dd.yiv4743199500last p
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv4743199500
dd.yiv4743199500last p span.yiv4743199500yshortcuts
{margin-right:0;}#yiv4743199500 div.yiv4743199500attach-table div div a
{text-decoration:none;}#yiv4743199500 div.yiv4743199500attach-table
{width:400px;}#yiv4743199500 div.yiv4743199500file-title a, #yiv4743199500
div.yiv4743199500file-title a:active, #yiv4743199500
div.yiv4743199500file-title a:hover, #yiv4743199500 div.yiv4743199500file-title
a:visited {text-decoration:none;}#yiv4743199500 div.yiv4743199500photo-title a,
#yiv4743199500 div.yiv4743199500photo-title a:active, #yiv4743199500
div.yiv4743199500photo-title a:hover, #yiv4743199500
div.yiv4743199500photo-title a:visited {text-decoration:none;}#yiv4743199500
div#yiv4743199500ygrp-mlmsg #yiv4743199500ygrp-msg p a
span.yiv4743199500yshortcuts
{font-family:Verdana;font-size:10px;font-weight:normal;}#yiv4743199500
.yiv4743199500green {color:#628c2a;}#yiv4743199500 .yiv4743199500MsoNormal
{margin:0 0 0 0;}#yiv4743199500 o {font-size:0;}#yiv4743199500
#yiv4743199500photos div {float:left;width:72px;}#yiv4743199500
#yiv4743199500photos div div {border:1px solid
#666666;height:62px;overflow:hidden;width:62px;}#yiv4743199500
#yiv4743199500photos div label
{color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv4743199500
#yiv4743199500reco-category {font-size:77%;}#yiv4743199500
#yiv4743199500reco-desc {font-size:77%;}#yiv4743199500 .yiv4743199500replbq
{margin:4px;}#yiv4743199500 #yiv4743199500ygrp-actbar div a:first-child
{margin-right:2px;padding-right:5px;}#yiv4743199500 #yiv4743199500ygrp-mlmsg
{font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv4743199500
#yiv4743199500ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv4743199500
#yiv4743199500ygrp-mlmsg select, #yiv4743199500 input, #yiv4743199500 textarea
{font:99% Arial, Helvetica, clean, sans-serif;}#yiv4743199500
#yiv4743199500ygrp-mlmsg pre, #yiv4743199500 code {font:115%
monospace;}#yiv4743199500 #yiv4743199500ygrp-mlmsg *
{line-height:1.22em;}#yiv4743199500 #yiv4743199500ygrp-mlmsg #yiv4743199500logo
{padding-bottom:10px;}#yiv4743199500 #yiv4743199500ygrp-msg p a
{font-family:Verdana;}#yiv4743199500 #yiv4743199500ygrp-msg
p#yiv4743199500attach-count span {color:#1E66AE;font-weight:700;}#yiv4743199500
#yiv4743199500ygrp-reco #yiv4743199500reco-head
{color:#ff7900;font-weight:700;}#yiv4743199500 #yiv4743199500ygrp-reco
{margin-bottom:20px;padding:0px;}#yiv4743199500 #yiv4743199500ygrp-sponsor
#yiv4743199500ov li a {font-size:130%;text-decoration:none;}#yiv4743199500
#yiv4743199500ygrp-sponsor #yiv4743199500ov li
{font-size:77%;list-style-type:square;padding:6px 0;}#yiv4743199500
#yiv4743199500ygrp-sponsor #yiv4743199500ov ul {margin:0;padding:0 0 0
8px;}#yiv4743199500 #yiv4743199500ygrp-text
{font-family:Georgia;}#yiv4743199500 #yiv4743199500ygrp-text p {margin:0 0 1em
0;}#yiv4743199500 #yiv4743199500ygrp-text tt {font-size:120%;}#yiv4743199500
#yiv4743199500ygrp-vital ul li:last-child {border-right:none
!important;}#yiv4743199500