Subject Re: [firebird-support] LIMIT Keyword
Author Martijn Tonies
> >>Is there a workaround for the missing LIMIT Keyword in firebird?
> >
> >
> > SELECT FIRST x SKIP y ...
>
> But why not other limits?
>
> for example:
> select .... limit time 5000 ms

"ms" has nothing to do with SQL.

> select .... limit read 1000 datapage

datapages have nothing to do with SQL.

> select .... limit 1000 rows

This is what it does.

> I thing if this limit can checked regularly while data retrieve/process
> the database engine can except of wrong selects.
>
> It's an easy way then break select at other thread (what planed if i
> know good it).
>
> ----
>
> select .... limit time 5000 ms
> break select if time of composition too long
> (for example not indexed join)

And then what? What should the engine return then?

> select .... limit read 1000 datapage
> break select if too many datapage need to read
> (for example a few record retrieving with full read against indexed)
>
> select .... limit 1000 rows
> break select if if too many result rows found
> (for example join without good filter)
>
>
> Why good?
> - When programmer build a select, design resources too for this
> statement. If something wrong the resource is less then limited.
> - When programmer give a way for user (app. feasibility) for make own
> 'when' criterion for select, the users can define too loose condition.

So?

With regards,

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