[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:
Depends
Duplicate
is duplicated by SERVER-10845 Specifying notablescan in connection ... Closed
Related
is related to SERVER-15561 I want to apply notablescan to per DB... Backlog
is related to SERVER-34127 Add user role action that will allow ... Closed
Assigned Teams:
Query Optimization
Participants:
Case:

 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,
when using the ("_id" > lastId, $natural order) condition to resume the cursor.

2. It would be very useful to be able to turn it off for each connection/statement, just in case
(mostly for ad-hoc queries from interactive clients). Possibly also as workaround for 1 above.

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.

Generated at Thu Feb 08 02:56:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.