Redis Learning Note (eight)--common Redis startup miscellaneous commands

Source: Internet
Author: User
Tags epoll redis
Single process

Redis single process model, to handle client requests, by wrapping the Epoll function, the actual processing speed of Redis relies entirely on the execution efficiency of the process. Epoll, the Linux kernel's improved epoll for handling large-volume file descriptors, is an enhanced version of Linux under Multiplexing, IO interface select/poll, which significantly improves system CPU utilization in a large number of concurrent connections with only a few active cases Redis default of 16 databases

Redis defaults to 16 of the database, similar to arrays, subscript from 0 onwards to 15, you can find the corresponding description from the redis.conf configuration file as shown below.

It also tells us that the default warehouse is library NO. 0, switch Warehouse use command select dbid

Redis in the terminal has automatic completion of the function, input sel press TAB will be automatically complete and uppercase, as shown above, we switch the library number 16 when the error, prompt overflow. View the number of keys

You can view the number of keys for the current library by using the following command

Dbsize

Through the command keys * see that there are really two keys emptied of the current warehouse and all warehouses

Empty the current warehouse, the current warehouse No. 0 has two pairs of key-value pairs, we then create two key-value pairs in the 3rd library.

And then use the instructions under library 3rd,

Flushdb

Clear Library 3rd Data

Then set the K1 and K2 in the 3rd library to delete all
Using directives

Flushall

You can see that we used Flushall under library 3rd and switched back to library No. 0, and the data for library No. 0 was cleared.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.