Re: [Django] #11003: Add USE INDEX, FORCE INDEX capabilities to ORM

2015-10-02 Thread Django
#11003: Add USE INDEX, FORCE INDEX capabilities to ORM
-+-
 Reporter:  Renato Alves |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  INDEX USE FORCE  | Triage Stage:  Design
 |  decision needed
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by krid):

 * ui_ux:   => 0
 * type:   => Uncategorized
 * severity:   => Normal
 * easy:   => 0


Comment:

 The django-mysql extension supports indexing hints:
 http://django-
 
mysql.readthedocs.org/en/latest/queryset_extensions.html?highlight=index#django_mysql.models.use_index

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.62c094345ad4788e4d4fde6854f1a0ad%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #11003: Add USE INDEX, FORCE INDEX capabilities to ORM

2010-07-03 Thread Django
#11003: Add USE INDEX, FORCE INDEX capabilities to ORM
---+
  Reporter:  Renato Alves  | Owner:  nobody 

Status:  closed| Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:  wontfix   |  Keywords:  INDEX USE 
FORCE
 Stage:  Design decision needed| Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  1  

Needs_better_patch:  0 |  
---+
Changes (by lrekucki):

  * status:  reopened => closed
  * resolution:  => wontfix

Comment:

 Please do not reopen tickets marked as `won't fix` by core developers (I'm
 not a one), without prior discussion on [http://groups.google.com/group
 /django-developers django-developers]. Send your proposal there and if
 consensus is reached, the ticked will be accepted.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #11003: Add USE INDEX, FORCE INDEX capabilities to ORM

2010-07-03 Thread Django
#11003: Add USE INDEX, FORCE INDEX capabilities to ORM
---+
  Reporter:  Renato Alves  | Owner:  nobody 

Status:  reopened  | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  INDEX USE 
FORCE
 Stage:  Design decision needed| Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  1  

Needs_better_patch:  0 |  
---+
Changes (by simon29):

 * cc: rkm, simon29 (added)
  * status:  closed => reopened
  * has_patch:  0 => 1
  * resolution:  wontfix =>
  * needs_tests:  0 => 1

Comment:

 Here's a suggestion. See patch. Works on MySQL.

 {{{
 Model.objects.filter(field=value).with_hints('my_index')
 Model.objects.filter(field__fk1__fk2=value).with_hints('my_index',
 RelatedModel1='index1', RelatedModel2='index2')
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #11003: Add USE INDEX, FORCE INDEX capabilities to ORM

2010-05-05 Thread Django
#11003: Add USE INDEX, FORCE INDEX capabilities to ORM
---+
  Reporter:  Renato Alves  | Owner:  nobody 

Status:  closed| Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:  wontfix   |  Keywords:  INDEX USE 
FORCE
 Stage:  Design decision needed| Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 This is one of those occasions where every database does something
 slightly different. MySQL uses FORCE INDEX in the query. Postgres uses
 configuration of query planner costs. SQLite does nothing (as far as I
 know). NoSQL backends (which are on the way) don't have any directly
 analog.

 I don't see any obvious way to represent this problem in a generic
 fashion. I'm really not in favor of adding this to extra. Firstly, extra
 is already a nightmare of twisty dark passages without introducing
 additional complexity; secondly it's not obvious to me at all how
 extra(final=None) would map in a generic way to index use (especially
 given that you could have multiple joins on a single table, each requiring
 different index use). In my opinion, if you need to interact with the
 query at this level, you should be using a raw query, not trying to hack
 things into extra.

 I'm going to mark this wontfix. Index use is a very important part of
 optimization, but that doesn't mean it has to be an important part of the
 ORM. That said, index use is an important part of optimization, so if
 anyone can make a good proposal for how to add index hinting support in an
 elegant and generic way, I'm open to further discussion.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #11003: Add USE INDEX, FORCE INDEX capabilities to ORM

2010-05-05 Thread Django
#11003: Add USE INDEX, FORCE INDEX capabilities to ORM
---+
  Reporter:  Renato Alves  | Owner:  nobody 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  INDEX USE 
FORCE
 Stage:  Design decision needed| Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by clouserw):

 * cc: clous...@gmail.com (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #11003: Add USE INDEX, FORCE INDEX capabilities to ORM

2009-07-29 Thread Django
#11003: Add USE INDEX, FORCE INDEX capabilities to ORM
---+
  Reporter:  Renato Alves  | Owner:  nobody 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  INDEX USE 
FORCE
 Stage:  Unreviewed| Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by adamnelson):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I agree, I think a parameter should be added to QuerySet.extra()

 http://docs.djangoproject.com/en/dev/ref/models/querysets/#extra-select-
 none-where-none-params-none-tables-none-order-by-none-select-params-none

 Maybe a key value like extra(final=None) for SQL to be appended to
 whatever the generated SQL is.  Of course, this would not be portable.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---