JSONs are not possible for 10_000_000 records
As hippo says, JSON is just a data format.
Let's give it a try, testing with some generated md5 values:
testdb=# select count(*) from vkon_json;
count
----------
10000000
(1 row)
testdb=# select * from vkon_json limit 3;
js | id
--------------------------------------------+----
{"f1": "c4ca4238a0b923820dcc509a6f75849b"} | 1
{"f1": "c81e728d9d4c2f636f067f89cc14862c"} | 2
{"f1": "eccbc87e4b5ce2fe28308fd9f2a7baf3"} | 3
(3 rows)
-- retrieve:
testdb=# select * from vkon_json
where js @> '{"f1": "d1ca3aaf52b41acd68ebb3bf69079bd1"}';
js | id
--------------------------------------------+----------
{"f1": "d1ca3aaf52b41acd68ebb3bf69079bd1"} | 10000000
(1 row)
Time: 0.679 ms
Less than half a millisecond. What do you think? Possible?
(I could have put everything into a 1-column, 1-row table but that just seems too dumb. Possible, though, and will perform just as fast)
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|