Subject | Re: [firebird-support] Re: Is ESQL Faster than Dynamic SQL. |
---|---|
Author | Milan Babuskov |
Post date | 2007-07-18T16:58:44Z |
inoffensive_2006 wrote:
contact_record_vector_ptr a std::vector? Pushing back records one by one
is not very effective. You should try to reserve space in vector in
chunks of 1000 or more.
http://www.sgi.com/tech/stl/Vector.html#4
from exporting various data via FBExport (which uses IBPP).
Perhaps you should try to run the same select with FBExport yourself
(it's an open source tool, see my signature) and if you get any speed
difference. If it's still slow, perhaps your database has a lot of
garbage (old records) and backup+restore cycle would help.
HTH
--
Milan Babuskov
http://fbexport.sourceforge.net
> st->Prepare(sql_string.c_str());You code seems quite straightforward except for this one here. Is
> st->Execute();
> row_has_been_read = st->Fetch();
> while (row_has_been_read && !error_found)
> {
> {
> contact_record_ptr = new CONTACT_RECORD;
>
> contact_record_vector_ptr->
> push_back(contact_record_ptr);
contact_record_vector_ptr a std::vector? Pushing back records one by one
is not very effective. You should try to reserve space in vector in
chunks of 1000 or more.
http://www.sgi.com/tech/stl/Vector.html#4
> When run as the first query this selects recordsNot too impressive. This (6k-9k records/second) is a regular speed I get
> at the rate of almost 350 rows / second. I then
> test a number of SELECT statements selecting
> different columns, including just the key and the
> sort name. The table is fairly large, and the
> SELECT key and sort name max out at around 425.
> But the second and third selects of these columns
> in this sample top out at an impressive
> 8000 rows / second.
from exporting various data via FBExport (which uses IBPP).
Perhaps you should try to run the same select with FBExport yourself
(it's an open source tool, see my signature) and if you get any speed
difference. If it's still slow, perhaps your database has a lot of
garbage (old records) and backup+restore cycle would help.
HTH
--
Milan Babuskov
http://fbexport.sourceforge.net