>I have a complex view joining several tables
>I don't want the data, just a row that will give me the structure and allow me use the mapping to create a datatable in a dataset.
>
>I've been using this technique for zillions of views, but something about this view is odd and I got the following:
>
>
>When I run:
>SELECT TOP 1 * FROM myview
>the server times out.
>
>
>When I run:
>SELECT TOP 1 PERCENT * FROM myview
>I get a result in a few milliseconds.
>
>
>I tried ORDER BY 1 and got the same result
>
>So, of course I used TOP 1 PERCENT
>
>My question is.. does anyone know why there's such a difference between TOP 1 and TOP 1 PERCENT?
>
>Or, is the a better way to get the mapping into a datatable?
SELECT TOP 0 * FROM myview