Subject | Re: [firebird-support] Fastest way to query tables and views and return no records. |
---|---|
Author | Robert martin |
Post date | 2009-03-03T00:12:32Z |
Hi
If you are after field definitions the best way would to just query the
RDB$ tables. RDB$Fields probably has a lot of the data you are looking for.
Thanks
Rob
esbreidenbach wrote:
If you are after field definitions the best way would to just query the
RDB$ tables. RDB$Fields probably has a lot of the data you are looking for.
Thanks
Rob
esbreidenbach wrote:
> Hi,
>
> I have a routine I use in my application which runs a separate query
> on every table and view in the database. The purpose of these queries
> is really just to obtain the field definitions of the underlying
> table, not to return any actual data.
>
> The routine uses the following generic SQL:
>
> Select * from TableName/ViewName where 1 = 0;
>
> My problem is that these queries can run very slowly on views which
> are really meant to have additional where clause statements, and even
> on tables with large numbers of records. The intention of the where
> clause "where 1 = 0" was to eliminate any query activity, but it is
> not working out this way.
>
> Is there a query which I can execute that will run very fast (and
> return no data), or any other ideas on how to do what I want?
>
> Thanks,
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>
>