Details
-
Bug
-
Resolution: Duplicate
-
Major
-
4.5.0, 4.5.1
-
None
-
OS: CentOS 7, Linux Kernel 3.10.0-514.6.1.el7.x86_64
DB: Couchbase Server 4.5.1-2844 (CE) and Couchbase Server 4.5.0-2601 (CE)
libcouchbase: libcouchbase2-core.x86_64 2.7.6 1.el7.centos
couchbase-python-client: 2.2.2
Python: 2.7.5
-
Untriaged
-
Centos 64-bit
-
No
Description
Problem:
When using a list parameter value for N1QL query with IN statement - it fails to properly build an index scan. As a result performance is hit dramatically for large data sets.
This issue is not observed if using a hand-made query where a list parameter was inserted manually.
Steps to Reproduce:
- Install travel-sample bucket.
- Run attached screen.
- Compare Explain output and timing.
Expected Result:
Both queries (with parameters and without parameters) are semantically the same, hence both explain and time to run a query should be the same.
Actual Result:
A plan analyzer fails to properly build an index scan for a parametrized query.
As result a time to run it is much higher: it's 2s vs 300ms for a travel-sample; in our real-world scenario with 1M records it is like 2 minutes vs 2-3 seconds.
Attachments
Issue Links
- duplicates
-
MB-24871 Improve optimization for adhoc queries with parameters.
- Closed