Subject | Re: RES: [firebird-support] How to improve update performance with millions records? |
---|---|
Author | firebird_jimmy |
Post date | 2012-06-12T09:39:28Z |
--- In firebird-support@yahoogroups.com, Thomas Steinmaurer <ts@...> wrote:
{
start transaction;
for j from 1 to 1000 do
{
execute a update statement;
/*update table1 set .... where rid = :rid;
rid is primary key of table1
table1 is a single table, not depend on other table or proc...
*/
}
commit transaction;
}
>for i from 1 to N do
> > --- In firebird-support@yahoogroups.com, "Fabiano"<fabianoaspro@> wrote:
> >>
> >> What frequency do you backup/restore this database?
> >> This database can not stop, It used to realtime collect data.
> > so no restore only backup, backup it once a week.
> >> What firebird version? SS CS?
> >> FB2.5 SS, i use FB2.1 SS to testï¼same result.
> > OS is win XP, change to Win 2008 Server, same result.
> >> What your garbage policy?
> >> Sweep interval = 200 to 20000, when sweeper run, the update speed
> > become more slowly than normal.
>
> Could be:
>
> * Background garbage collection (data + index)
> * Automatic sweep kicking in
> * Using AutoCommit/Commit Retaining without doing a hard commit from
> time to time
>
>
> - Is this a single client attachment/application doing the work or are
> Yes, now test only. a single client can update.
>
> multiple attachments connecting to the database?
> when testting, three client attachments, but only connect, none operation.
>
> - Can you clarify what the update process exactly does?
> i write a app with delphi7 + dbx, for test
{
start transaction;
for j from 1 to 1000 do
{
execute a update statement;
/*update table1 set .... where rid = :rid;
rid is primary key of table1
table1 is a single table, not depend on other table or proc...
*/
}
commit transaction;
}
>
> Btw, SuperServer can't utilize multiple cores/CPUs for a single database.
> No problem, firebird.conf is defualt, use single cpu.
>
> Regards,
> Thomas
>
>
>
>
> >> De: firebird-support@yahoogroups.com
> >> [mailto:firebird-support@yahoogroups.com] Em nome de firebird_jimmy
> >> Enviada em: segunda-feira, 11 de junho de 2012 10:01
> >> Para: firebird-support@yahoogroups.com
> >> Assunto: [firebird-support] How to improve update performance with millions
> >> records?
> >>
> >>
> >>
> >>
> >>
> >> Hi, I'm jimmy
> >> I have a problem, please help me!
> >> I have a table with 3,000,000 rows record, every row update 1 to 5 times in
> >> one day. The speed of update statement become slowly, about 30
> >> records/second, but insert speed above 1000 records/second.
> >> Is my usage be bad or not?
> >> what should i do?
> >>
> >> thanks!
> >>
> >> 20120610
> >>
> >>
> >>
> >>
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >
> >
> >
> >
> > ------------------------------------
> >
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >
> > Visit http://www.firebirdsql.org and click the Resources item
> > on the main (top) menu. Try Knowledgebase and FAQ links !
> >
> > Also search the knowledgebases at http://www.ibphoenix.com
> >
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > Yahoo! Groups Links
> >
> >
> >
>