Subject Re: Facing Problems in executing the Select query
Author rambabu_piridi
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@...>
wrote:
>
> > > > Hi All,
> > > >
> > > > We are using Firebird 1.5.3 for our application.
We
> > are
> > > > using a SELECT query which fetches data from four different
> > tables. If
> > > > this query is executed for about 10,000 times, we observed
that
> > the
> > > > number of IO write operations on the Firebird service is much
> > larger
> > > > than the number of IO read operations. Does the number of
> > executions
> > > > of a query affect the number of IO read/ write operations?
> > > >
> > > >
> > > >
> > > > Thanks,
> > > > Sarvani
> > >
> > > everything is happening within the context of a transaction.
> > > The transaction IDs have to written
> > > Alan
> > >
> > Thanks for your post. But could you please elaborate a little
more?
> > We are not very clear about this...
> > bipasha
>
> well, you say you execute the query 10,000 times.
> I don't know if you execute it within the context of one
transaction or if
> you start and commit a transaction for each of the 10,000
executions.
> I have no idea what language or component set you use for all this.
> assuming that you execute a query within it's own transaction,
then the
> server will create the transaction (write), you will request the
records
> (read), you will commit the transaction (write). So yes - the
impact of
> 10,000 queries certainly has an impact on IO read/write
operations. If you
> are running linux with forced writes off then these opearations
will be
> delayed, if you use Windows with FW ON, then these operations are
immediate.
>
> Alan
>



We are working on Java/iBatis with Firebird DB on Windows single CPU
machine. Each query in our case would be within its own transaction.
In the case of an INSERT or UPDATE query the start & commit
transaction would be required. But will this also be true in case of
a SELECT query? (none of the sub-queries update or insert into the
database; they only select data)
Also, how to set ForcedWrites ON/OFF?

Bipasha