Subject | RE: [firebird-support] Best index for BETWEEN? |
---|---|
Author | Mercea Paul |
Post date | 2008-10-15T18:49:16Z |
>From: firebird-support@yahoogroups.com[mailto:firebird-support@yahoogroups.com] On Behalf Of Milan Babuskov
>Sent: Wednesday, October 15, 2008 19:31Are you sure about this select?
>To: firebird-support@yahoogroups.com
>Subject: [firebird-support] Best index for BETWEEN?
>Hi,
>In an application I'm currently developing I have a lot of parametrized
>queries like this:
>SELECT * FROM table1 t WHERE :somevalue BETWEEN t.field1 AND t.field2;
For me looks more logic something like:
SELECT * FROM table1 t WHERE t.id_or_date BETWEEN :param1 AND :param2;
And this guide me to make index on t.id_or_date field .
Regards,
Paul