[SERVER-1143] Allow --notablescan to be specified per connection Created: 24/May/10 Updated: 07/Apr/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Michael Schurter | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 14 |
| Labels: | asya | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||
| Description |
|
Being able to disallow table scans on a per-connection basis would be useful for testing. An applications test suite could disallow table scans so that any test that attempted a full table scan would fail. Finer grained per-query --notablescan would be more useful, but the above would sufficiently cover the most common use case of testing code. |
| Comments |
| Comment by Marko Macek [ 08/Sep/16 ] |
|
I agree with Glen... I am using it on test machine by default but have occasional issues: 1. I think there's a serious bug because it seems 'notablescan' also applies to tailable collections/queries, 2. It would be very useful to be able to turn it off for each connection/statement, just in case 3. SERVER-15561 (per db/collection) would also be nice (especially to disable the default) although fixing 1 or adding 2 would be just fine. |
| Comment by Glen Miner [ 11/Jun/15 ] |
|
My preference would be the reverse – notablescan on by default and you can take the safety off like rs.slaveOk() for the connection when you really want to play with fire. We've been bitten by COLSCAN quries way, way too many times. |
| Comment by Hiroaki [ 08/Oct/14 ] |
|
Totally agree with you Nils.. |
| Comment by Nils [ 20/Nov/12 ] |
|
This really would be a nice feature to have. Specifying --notablescan on the server is often a non-starter as it would make it almost impossible to perform ad-hoc queries. And so this very useful functionality remains mostly unusable. |