Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Facebook
Downloads
Home
>
mailing lists
jsonb and comparison operators - Mailing list pgsql-general
From
Joe Van Dyk
Subject
jsonb and comparison operators
Date
September 3, 2014
07:39:35
Msg-id
CACfv+pKoL+-sn3g_4FPyJXqb1+hbv97B8+8umXYh1qpHf9eDTA@mail.gmail.com
Whole thread
Raw
Responses
Re: jsonb and comparison operators
(Peter Geoghegan <peter.geoghegan86@gmail.com>)
Re: jsonb and comparison operators
(Oleg Bartunov <obartunov@gmail.com>)
List
pgsql-general
Tree view
Is it possible to get this query (or a similar one) to use an index?
I want to return all rows that have a value of less than 10. I have arbitrary keys I want to check (not just 'a').
drop table if exists test;
create table test (j jsonb);
insert into test select json_build_object('a', i)::jsonb from generate_series(1, 100000) i;
create index on test using gin(j);
vacuum analyze test;
select * from test where (j->>'a')::int < 10;
I tried
select * from test where j->'a' < 10::json::jsonb;
but didn't seem to use the index.
pgsql-general
by date:
Previous
From:
Patrick Dung
Date:
03 September 2014, 06:03:25
Subject:
Re: Question about gin index not used on a tsv column
Next
From:
Peter Geoghegan
Date:
03 September 2014, 07:55:53
Subject:
Re: jsonb and comparison operators
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
I confirm that I have read and accepted PostgresPro’s
Privacy Policy
.
I agree to get Postgres Pro discount offers and other marketing communications.
✖
×
×
Everywhere
Documentation
Mailing list
List:
all lists
pgsql-general
pgsql-hackers
buildfarm-members
pgadmin-hackers
pgadmin-support
pgsql-admin
pgsql-advocacy
pgsql-announce
pgsql-benchmarks
pgsql-bugs
pgsql-chat
pgsql-cluster-hackers
pgsql-committers
pgsql-cygwin
pgsql-docs
pgsql-hackers-pitr
pgsql-hackers-win32
pgsql-interfaces
pgsql-jdbc
pgsql-jobs
pgsql-novice
pgsql-odbc
pgsql-patches
pgsql-performance
pgsql-php
pgsql-pkg-debian
pgsql-pkg-yum
pgsql-ports
pgsql-rrreviewers
pgsql-ru-general
pgsql-sql
pgsql-students
pgsql-testers
pgsql-translators
pgsql-www
psycopg
Period
anytime
within last day
within last week
within last month
within last 6 months
within last year
Sort by
date
reverse date
rank
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
By continuing to browse this website, you agree to the use of cookies. Go to
Privacy Policy
.
I accept cookies