Comments (7)
@spetrunia In the above example, do you know if there is any way to know the length of equal conditions at ha_rocksdb::index_read_map()? ("id1=1 AND id2=1 AND id3>=2" => equal cond length is 4 + 8 + 4=16 (index_id + 8 byte id1 + 4 byte id2), and "id1=1 AND id2>=1 AND id3>=2" => equal cond length is 4+8=12)
from mysql-5.6.
One can't see the end of the range inside ha_rocksdb::index_read_map() call.
We need to overload handler::read_range_first(). It sees both ends of the range, so we can compare both endpoints and find the length of the common prefix.
from mysql-5.6.
Thanks @spetrunia! I'm going to fix it.
from mysql-5.6.
One point to note is that if the range spans more than one prefix for rocksdb, you cannot use the bloom filter.
On Sep 11, 2015, at 2:49 PM, Sergei Petrunia <[email protected]mailto:[email protected]> wrote:
One can't see the end of the range inside ha_rocksdb::index_read_map() call.
We need to overload handler::read_range_first(). It sees both ends of the range, so we can compare both endpoints and find the length of the common prefix.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/109#issuecomment-139669070.
from mysql-5.6.
Handling IN clause is also interesting.
example: select * from r1 where id1=1 and id2 in (1,2,3);
read_range_first() is called three times, and both start_key and end_key matched on both id1 and id2. can_use_bloom_filter() is called only once at ha_rocksdb::setup_index_scan(), because Iterator is reused in this statement. MyRocks needs either of the following I think.
- Do not include id2 for bloom filter. Only (index_id + id1=1) should be used. The problem is this is less efficient, and I'm not sure how to get that from read_range_first().
- Decide if bloom filter can be used or not per each setup_index_scan().
from mysql-5.6.
https://reviews.facebook.net/D46851
@spetrunia Could you please review this diff? This diff calls kd->pack_index_tuple() twice (for end key and start key), and I'm still not 100% confident that it is safe.
end_key_packed_size= kd->pack_index_tuple(table, pack_buffer,
end_key_packed_tuple, end_key->key,
end_key->keypart_map);
packed_size= kd->pack_index_tuple(table, pack_buffer,
sec_key_packed_tuple, key,
keypart_map);
from mysql-5.6.
@yoshinorim, reviewed, ok to push. pack_index_tuple modifies table->record[0](where the record is returned), but this should be ok because the column values will be decoded back from the storage format when the record is read.
from mysql-5.6.
Related Issues (20)
- UPDATE may hang when it does a full table scan and updates PK values HOT 3
- Add kv_format_version into RDBSE_KEYDEF and data dictionary
- Include RocksDB utility tools into MySQL binary HOT 4
- rocksdb.rocksdb test asserts with message "Failed to get column family info from index id" HOT 8
- SIGSEGV on create table contention HOT 2
- Release Row Locks when necessary, Transaction API variant
- Add more information to SHOW ENGINE ROCKSDB TRANSACTION STATUS
- DML statements over reverse-ordered CFs are very slow after #86. HOT 5
- rocksdb.cardinality and other tests fail assert in rocksdb::port::PthreadCall HOT 23
- Possible memory leak in RDBSE_KEYDEF::setup
- background space reclaim isn't working after DROP DATABASE HOT 1
- Enable specifying per column family options without a separate config file
- Add rocksdb-specific tests to parts suite
- Refine checkpoint logic in MyRocks
- Using SingleDelete() in MyRocks
- Reduce rocksdb_sys_vars suite to one test
- Automatically setup bootstrap for rocksdb tests
- DROP TABLE may take long time to wait for Seek() by drop_index_thread HOT 1
- UPDATE for table with VARCHAR pk gives "Can't find record" error HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mysql-5.6.