Re: [Django] #24200: Make introspection bypass statement caching on Oracle

2015-02-10 Thread Django
#24200: Make introspection bypass statement caching on Oracle
-+-
 Reporter:  shaib|Owner:  jarshwah
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.8alpha1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  oracle   | Triage Stage:  Ready for
  introspection  |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Shai Berger ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"1fbe8a2de334bfec5e9b77e36f8a3c1cf2cd70be"]:
 {{{
 #!CommitTicketReference repository=""
 revision="1fbe8a2de334bfec5e9b77e36f8a3c1cf2cd70be"
 Fixed #24200 -- Made introspection bypass statement cache
 }}}

--
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/063.972e116d299137078a236a58206f32aa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24200: Make introspection bypass statement caching on Oracle

2015-02-10 Thread Django
#24200: Make introspection bypass statement caching on Oracle
-+-
 Reporter:  shaib|Owner:  jarshwah
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.8alpha1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  oracle   | Triage Stage:  Ready for
  introspection  |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Shai Berger ):

 In [changeset:"3518d51697f1f2e0a516cd82dfc6e05f9f686dab"]:
 {{{
 #!CommitTicketReference repository=""
 revision="3518d51697f1f2e0a516cd82dfc6e05f9f686dab"
 [1.8.x] Fixed #24200 -- Made introspection bypass statement cache

 Backport of 1fbe8a2de3 from master
 }}}

--
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/063.35902e3e049a10af2998838a80b6f0d4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24200: Make introspection bypass statement caching on Oracle

2015-02-09 Thread Django
#24200: Make introspection bypass statement caching on Oracle
-+-
 Reporter:  shaib|Owner:  jarshwah
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.8alpha1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Ready for
  introspection  |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by jarshwah):

 * owner:  nobody => jarshwah
 * status:  new => assigned
 * has_patch:  0 => 1
 * stage:  Accepted => Ready for checkin


Comment:

 https://github.com/django/django/pull/4101/

 New PR implementing Shai's original proposal which turned out to be a much
 better idea.

--
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/063.57d608f6706f8b42d87c721eceebc566%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24200: Make introspection bypass statement caching on Oracle

2015-02-08 Thread Django
#24200: Make introspection bypass statement caching on Oracle
-+-
 Reporter:  shaib|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.8alpha1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Accepted
  introspection  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by jarshwah):

 See https://github.com/django/django/pull/4090

--
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/063.9e52cd8d35a38f799cfdfe25969b5cce%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24200: Make introspection bypass statement caching on Oracle

2015-02-04 Thread Django
#24200: Make introspection bypass statement caching on Oracle
-+-
 Reporter:  shaib|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.8alpha1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Accepted
  introspection  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by timgraham):

 You have until the beta release to submit non-release blocker bug fixes of
 which this seems to fall into.

--
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/063.233e746609aa3688a7c1d8a71c1176cb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24200: Make introspection bypass statement caching on Oracle

2015-02-04 Thread Django
#24200: Make introspection bypass statement caching on Oracle
-+-
 Reporter:  shaib|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.8alpha1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Accepted
  introspection  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by jarshwah):

 Is this something that we want to include for 1.8, or is this going to be
 targeting master? I'll put together a patch for it within the next few
 days if inclusion for 1.8 is the goal.

--
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/063.11740557917af8e8b1dfd02a58d02bae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24200: Make introspection bypass statement caching on Oracle

2015-01-22 Thread Django
#24200: Make introspection bypass statement caching on Oracle
-+-
 Reporter:  shaib|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.8alpha1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Accepted
  introspection  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by jarshwah):

 The flush shared_pool just flushes server side statements AFAIK, and
 doesn't work with the recommended privileges (you need system-like privs).

--
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/063.a65b72d4a0b96867fb01fa452a76cd35%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24200: Make introspection bypass statement caching on Oracle

2015-01-22 Thread Django
#24200: Make introspection bypass statement caching on Oracle
-+-
 Reporter:  shaib|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.8alpha1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Accepted
  introspection  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by claudep):

 * stage:  Unreviewed => 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 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/063.9aed715324368adef11cbed99943ad44%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24200: Make introspection bypass statement caching on Oracle

2015-01-21 Thread Django
#24200: Make introspection bypass statement caching on Oracle
-+-
 Reporter:  shaib|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.8alpha1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:
  introspection  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by charettes):

 I seems like `alter system flush shared_pool;`
 [http://stackoverflow.com/questions/858829/how-do-i-clear-oracle-
 execution-plan-cache-for-benchmarking#answer-917516 would also work].

--
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/063.d37e5503317d6dd4bcd5b178c3be2574%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24200: Make introspection bypass statement caching on Oracle

2015-01-21 Thread Django
#24200: Make introspection bypass statement caching on Oracle
-+-
 Reporter:  shaib|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.8alpha1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:
  introspection  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by jarshwah):

 I don't think we need to get too crazy with regards to cache busting.
 Simply setting the stmtcachesize to 0 and back to 20 clears the cache. We
 could also try to request a connection with caching disabled for
 migrations.

 {{{
 (Pdb) cursor = connection.cursor()
 (Pdb) cursor.execute('create table test_cache (int1 int, int2 int)')
 (Pdb) cursor.execute('select * from test_cache')
 >
 (Pdb) cursor.execute('select * from test_cache').fetchmany()
 []
 (Pdb) cursor.execute('alter table test_cache drop column int2')
 (Pdb) cursor.execute('select * from test_cache').fetchmany()
 *** django.db.utils.DatabaseError: ORA-01007: variable not in select list
 (Pdb) cursor.execute('select * from test_cache').fetchmany()
 *** django.db.utils.DatabaseError: ORA-01007: variable not in select list
 (Pdb) cursor.connection
 
 (Pdb) cursor.connection.stmtcachesize
 20
 (Pdb) cursor.connection.stmtcachesize = 0
 (Pdb) cursor.execute('select * from test_cache').fetchmany()
 []
 (Pdb) cursor.connection.stmtcachesize = 20
 (Pdb) cursor.execute('select * from test_cache').fetchmany()
 []
 }}}

--
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/063.c7a99f2d93d754ec4c2b2fd03234e6f5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #24200: Make introspection bypass statement caching on Oracle

2015-01-21 Thread Django
#24200: Make introspection bypass statement caching on Oracle
-+-
   Reporter:  shaib  |  Owner:  nobody
   Type: | Status:  new
  Cleanup/optimization   |
  Component:  Database   |Version:  1.8alpha1
  layer (models, ORM)|   Keywords:  oracle
   Severity:  Normal |  introspection
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 This comes from looking at the Oracle errors encountered in the initial
 fix for #24163.

 The Django Oracle backend currently
 
[https://github.com/django/django/blob/master/django/db/backends/oracle/base.py#L252
 uses a statement cache]. This means that if a statement is re-executed
 (soon enough after the previous execution), a compiled statement is
 fetched from the cache and performance is greatly improved.

 However, this causes problems with introspection during migrations; a
 compiled `select * from T` statement embeds in it the structure of table
 `T`, and if a column is dropped, then a cached `select * from T` will fail
 on "ORA-01007: variable not in select list". This is actually what happens
 --
 
[https://github.com/django/django/blob/master/django/db/backends/oracle/introspection.py#L62
 get_table_description on Oracle] uses a `select * from T` query.

 We have run into the problem in the past, but haven't understood it
 properly; so we introduced a workaround of disconnecting from the database
 after relevant schema changes, and a database feature
 `connection_persists_old_columns` to control its use. But in fact, simple
 cache-busting (e.g. rephrasing the query as `select * from %(table)s where
 0 > %(counter)d` with counter advancing each time) should solve the
 problem and make the disconnection, as well as the database feature,
 redundant.

 I think this fix should go also into 1.8, but definitely into master.

--
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/048.1823608fe39fd2430d984b35119ba54f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.