Re: row read performance




"joeNOSPAM@xxxxxxx" <joe.weinstein@xxxxxxxxx> wrote in message
news:1138465549.421322.83030@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> One of the basic tenets of DBMS application performance is to not
> move the
> data out of the DBMS unless you have to display it.

Yes, I have to display it, if it has changed ie Select includes a timestamp
check.

> What is the ratio of wanted rows to DBMS contents?

Tiny!


> type (forward only, insensitive) and statement.setFetchSize() to a
> reasonable
> setting for your purpose.

Yes, I'll do that.

> Then do one query, select the columns you need

Ah, so you believe that unasked for column does improve performance, ie 2
identical tables except that one table has a massive object column give the
same fetch performance if you never ask for that column.

> from the table where key
> IN
> (1,2,3,...) Ie: one list, which if you can sort at the client, it
> would be better.

I could do a bunch of
(pKey = x1 AND timeStamp > y1) OR
(pKey = x2 AND timeStamp > y2) OR ...

better than individual Selects - especially as I haven't even got a
connection pool - fairly toy like app at present.

there would likely be no more that 10 rows required

> What DBMS and driver are you using?

MySQL, ConnectorJ

--
Mike W


.