Re: index usage

2009-12-08 Thread Thomas Mueller
Hi,

That's true, I didn't think about this case... Unfortunately, I will
not have time to implement this right away. I will increase the
priority of the feature request.

Regards,
Thomas

--

You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-datab...@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.




Re: index usage

2009-12-05 Thread Thomas Mueller
Hi,

 CREATE INDEX t_idx1 ON t (s);
 CREATE UNIQUE INDEX t_idx2 ON t (s,i);

You are right, but in any case I wouldn't create two indexes like
this. Just create the second index. The first index will not help, it
only slows down insert/update/delete, and increase the database size.
I will add a feature request for 'automatic detection of redundant
indexes'.

Regards,
Thomas

--

You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-datab...@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.




Re: index usage

2009-12-02 Thread fschmidt
On Dec 2, 11:26 am, Thomas Mueller thomas.tom.muel...@gmail.com
wrote:
 Hi,

 That's true, this is not supported yet. I will add a feature request.
 A workaround is to use:

 select * from t where s=? order by s, i

Even this workaround may choose the wrong index and not use the
index.  For example, with:

CREATE INDEX t_idx1 ON t (s);
CREATE UNIQUE INDEX t_idx2 ON t (s,i);

H2 will use t_idx1 and not index sort.

I have sample code to show this but I can't attach it with this silly
Google Groups interface.

--

You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-datab...@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.