Skip Menu |

This queue is for tickets about the SQL-Abstract CPAN distribution.

Report information
The Basics
Id: 58516
Status: rejected
Priority: 0/
Queue: SQL-Abstract

People
Owner: Nobody in particular
Requestors: dekimsey [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [request] Adding index hints
Recently I ran into a statement that required the use of an index hint to get the MySQL optimizer to use the correct index. However, there doesn't appear to be support for this in SQL-Abstract. Is this a feature that might be worth considering adding? I've written it up its implementation already as well as some tests for it. The only thing I wasn't sure about was how the select statement should be extended ( I didn't extend where, but that would be trivial ). At the moment it made more sense to me to put the index clause before the where clause. But to do this I had to make the index clause recognizable from the where clause, so its a reference of a reference. Cheap trick, I know. Moving to the end of the where arguments is the alternative. I opted the (ref) route because putting the index clause at the end just makes it a little weirder to read. Thoughts, opinions?
From: dekimsey [...] gmail.com
On Fri Jun 18 11:28:40 2010, http://dekimsey.myopenid.com/ wrote: Show quoted text
> I didn't extend where, but that would be trivial.
Where is extended, just forgot to write tests (still need to do this). I've forked the module via gitpan, the changes I made I've pushed there. http://github.com/dekimsey/SQL-Abstract
On Fri Jun 18 11:28:40 2010, http://dekimsey.myopenid.com/ wrote: Show quoted text
> Recently I ran into a statement that required the use of an index hint > to get the MySQL optimizer to use the correct index. However, there > doesn't appear to be support for this in SQL-Abstract. Is this a feature > that might be worth considering adding? > > I've written it up its implementation already as well as some tests for > it. The only thing I wasn't sure about was how the select statement > should be extended ( I didn't extend where, but that would be trivial ). > > At the moment it made more sense to me to put the index clause before > the where clause. But to do this I had to make the index clause > recognizable from the where clause, so its a reference of a reference. > Cheap trick, I know. Moving to the end of the where arguments is the > alternative. I opted the (ref) route because putting the index clause at > the end just makes it a little weirder to read. > > Thoughts, opinions?
Are you using SQL::Abstract standalone, or with DBIx::Class? Further discussion hinges on this, so I'll stop here :)
On Fri Jun 18 11:28:40 2010, http://dekimsey.myopenid.com/ wrote: Show quoted text
> Recently I ran into a statement that required the use of an index hint > to get the MySQL optimizer to use the correct index. However, there > doesn't appear to be support for this in SQL-Abstract. Is this a feature > that might be worth considering adding? > > I've written it up its implementation already as well as some tests for > it. The only thing I wasn't sure about was how the select statement > should be extended ( I didn't extend where, but that would be trivial ). > > At the moment it made more sense to me to put the index clause before > the where clause. But to do this I had to make the index clause > recognizable from the where clause, so its a reference of a reference. > Cheap trick, I know. Moving to the end of the where arguments is the > alternative. I opted the (ref) route because putting the index clause at > the end just makes it a little weirder to read. > > Thoughts, opinions?
No reply from original reporter. Stalling for the time being.
Rejecting feature-request - no response from author.