Git Product home page Git Product logo

Comments (2)

miaojianxin avatar miaojianxin commented on May 20, 2024

我参考的是你这篇文章的方法:
https://github.com/digoal/blog/blob/c1a3db101af25ababd35d0e6963e4c1c4609c8d5/201701/20170116_03.md

from blog.

miaojianxin avatar miaojianxin commented on May 20, 2024

set enable_bitmap_indexscan=false;
只走index scan,查询计划

                                                              QUERY PLAN                         


Limit (cost=416.94..416.97 rows=10 width=258) (actual time=3561.033..3561.033 rows=0 loops=1)
Output: document_id, body, (smlar(regexp_split_to_array(lower(body), '[^[:alnum:]]'::text), '{fringilla,mal
esuada,euismod}'::text[]))
Buffers: shared hit=13022
-> Sort (cost=416.94..417.19 rows=100 width=258) (actual time=3561.032..3561.032 rows=0 loops=1)
Output: document_id, body, (smlar(regexp_split_to_array(lower(body), '[^[:alnum:]]'::text), '{fringil
la,malesuada,euismod}'::text[]))
Sort Key: (smlar(regexp_split_to_array(lower(documents.body), '[^[:alnum:]]'::text), '{fringilla,male
suada,euismod}'::text[])) DESC
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=13022
-> Index Scan using documents_tokenize_idx on public.documents (cost=0.28..414.78 rows=100 width=25
8) (actual time=3561.019..3561.019 rows=0 loops=1)
Output: document_id, body, smlar(regexp_split_to_array(lower(body), '[^[:alnum:]]'::text), '{fr
ingilla,malesuada,euismod}'::text[])
Index Cond: (regexp_split_to_array(lower(documents.body), '[^[:alnum:]]'::text) %% '{fringilla,
malesuada,euismod}'::text[])
Rows Removed by Index Recheck: 12299
Buffers: shared hit=13022
Planning time: 0.247 ms
Execution time: 3561.105 ms

from blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.