Created
March 15, 2019 17:08
-
-
Save sharonovd/c4ce42e9a26617d8c22b1fc786c51c8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local uuid = require('uuid') | |
local log = require('log') | |
box.cfg{} | |
box.schema.create_space('test', {if_not_exists=true }) | |
box.space.test:create_index('primary', {parts={1,'string'}, if_not_exists=true}) | |
for i = 1,1000000 do | |
box.space.test:replace({uuid.new():str(), 'test', 'testtesttesttesttesttesttesttesttesttesttesttest'}) | |
end | |
local clock = require('clock') | |
local start = clock.time64() | |
local count = 0ULL | |
for _, tuple in box.space.test.index.primary:pairs() do | |
count = count + 1 | |
end | |
log.info('Scanned %q tuples', count) | |
log.info('Runned time %q seconds', | |
tostring(tonumber(clock.time64() - start)/1000000000)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment