db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dag.wan...@oracle.com (Dag H. Wanvik)
Subject Re: Different select attributes return different resultset???
Date Sat, 10 Dec 2011 01:47:09 GMT
Sandeep Dixit <sdixit@ohioedge.com> writes:

> Here is the scenario:
>
> I had derby  10.8.1.2 up and running for about 10 days. Few hours ago
> I stopped it and restarted it. However it appears that my data is
> somehow messed up (or some setting that I am not aware of).
>
> If I run select activitytypeid from activitytype", it returns 35 records;
> if I run "select activitytypeid, name from activitytype", it returns
> only 28 records!!!
>
> I have no clue what is going on or where/what I should be looking for
> to fix this problem.

Presumably activitytypeid is a primary key, or has an explicit index on
it. It sounds as if the index is out of synch with the base
table. Possibly the first query only visits the index, whereas the
second reads the heap since it needs to fetch the column name as well..
In any case, it sounds like a bug.

Thanks,
Dag


>
> Please advise,
>
> Sandeep

Mime
View raw message