Subject Re: [firebird-support] PK vs Index on table scan
Author Martijn Tonies
Gary,


> I have a table customers with a PK on the field LINK, which is unique
>
> select * from customers where link = 'WWW0000010'
>
> the stats say 12123 non-indexed reads were performed during the operation
>
> Is this correct, or in other words, is this the way a PK is used?
>
> The plan says PLAN( CUSTOMERS NATURAL)
>
> The machine takes some strain, so I am almost sure a full table scan is
> happening.
>
> Any ideas or explainations would be appreciated.

Can you show us the full table DDL?

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com