<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56:11 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-1140] Support 64 (or more) indexes</title>
                <link>https://jira.mongodb.org/browse/SERVER-1140</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The current code supports up to 40 indexes per collection.  I think that we can support 64 without too much extra work, and much much more if you&apos;re willing to use some of the reserved bytes in Namespace.  AFAICT, the 40 index restriction is twofold:&lt;/p&gt;

&lt;p&gt;1. multiKeyIndexBits is a bitwise storage of the multi-key state for each index, and it uses an unsigned long long, limiting to 64 indexes&lt;/p&gt;

&lt;p&gt;2. the first 10 indexes are stored in the Namespace, the next 30 are stored in an extra block, currently limiting to 40 total indexes, however forethought was given to this, and there exists the capability to chain additional extra blocks.&lt;/p&gt;

&lt;p&gt;The attached patch implements the extra block chaining.  It accounts for the possibility of 10 more &quot;extra&quot; blocks by naming them $extra, $extr0, $extr1, $extr2 ... $extr9.  You could actually get another 300 using this, for a hard limit of 340.  However, because of the multiKeyIndexBits limitation, we&apos;re really limited to just 64 indexes.  I implemented the full chaining for future expansion.&lt;/p&gt;

&lt;p&gt;If you&apos;re interested in 128 indexes, just take 8 or more bytes from the reserved array, and create a multiKeyIndexMoreBits[] and carry the logic into the multiKey functions.  I did not do this because (a) the extra 24 indexes should be enough for our needs, (b) those reserved bytes are precious few and once you use them, they&apos;re gone, (c) I know we&apos;re crazy to want 64 indexes, and I think whoever wants 128 is even crazier.&lt;/p&gt;

&lt;p&gt;This patch is not yet complete.  It dies in db/pdfile.h +284 on an assertion &quot;ofs &amp;gt;= headerSize()&quot;.  But I&apos;ve only spent 2.5 hours on this so far, and it&apos;s late, and I wanted to get my work in progress in front of others to review and comment.&lt;/p&gt;</description>
                <environment></environment>
        <key id="12001">SERVER-1140</key>
            <summary>Support 64 (or more) indexes</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="dwight@mongodb.com">Dwight Merriman</assignee>
                                    <reporter username="douggreen">Doug Green</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 May 2010 00:28:15 +0000</created>
                <updated>Thu, 7 Jun 2018 17:00:36 +0000</updated>
                            <resolved>Wed, 26 May 2010 12:52:01 +0000</resolved>
                                                    <fixVersion>1.5.2</fixVersion>
                                                        <votes>2</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="1914037" author="ramon.fernandez" created="Thu, 7 Jun 2018 17:00:22 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=cade%40hyperblaster.org&quot; class=&quot;user-hover&quot; rel=&quot;cade@hyperblaster.org&quot;&gt;cade@hyperblaster.org&lt;/a&gt;, the request to allow more than 64 indexes is being tracked in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12250&quot; title=&quot;support arbitrary numbers of indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12250&quot;&gt;SERVER-12250&lt;/a&gt; &amp;#8211; please feel free to comment on that ticket and vote for it.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                            <comment id="1902527" author="cade@hyperblaster.org" created="Sat, 26 May 2018 22:20:48 +0000"  >&lt;p&gt;Any news on this?&lt;br/&gt;
Our use case is that we are using a single collection to store data that needs to be queried in multiple different ways, the 64 index limit is crippling to us and essentially makes any further scaling of our app impossible.&lt;/p&gt;

&lt;p&gt;Is there anything that can be done to lift this limit?&lt;/p&gt;</comment>
                            <comment id="1802288" author="cade@hyperblaster.org" created="Sun, 11 Feb 2018 23:22:16 +0000"  >&lt;p&gt;Is there any chance of the 64 index limit being upgraded? We really need the ability for more indexes&lt;/p&gt;</comment>
                            <comment id="749344" author="bitone" created="Mon, 27 Oct 2014 16:16:38 +0000"  >&lt;p&gt;Hey people,&lt;/p&gt;

&lt;p&gt;I have several projects (around 20) using MongoDB with document having on average 200 fields and at max 2000 fields. We have between 500.000 and 1 million documents on average.&lt;/p&gt;

&lt;p&gt;We have a customisable grid where the user can choose which column to display and on which field to filter.&lt;/p&gt;

&lt;p&gt;With the 64 indexes limit, it&apos;s a real pain for the user to apply filter on field that cannot benefit from the indexes as the index stock is exhausted and the full collection scan is of course really slow.&lt;/p&gt;

&lt;p&gt;We are thinking about using ElasticSearch to handle this grid, but it&apos;s really a big addition that brings its own problem (index synchronization with MongoDB for example) and where we wont benefit from most of the features (no need for full text index for example).&lt;/p&gt;

&lt;p&gt;We cannot split our collection as well because our documents are really flat and there&apos;s no logical way to cut them into smaller pieces.&lt;/p&gt;

&lt;p&gt;Moreover all the structure is really flexible and defined by the user, so a post splitting is really difficult.&lt;/p&gt;

&lt;p&gt;Any idea on what could be done to overcome this problem ? I suppose there&apos;s nothing planned to support more than 64 indexes in a collection ?&lt;/p&gt;

&lt;p&gt;Thanks a lot for your answer !&lt;/p&gt;</comment>
                            <comment id="487390" author="wiliam" created="Fri, 24 Jan 2014 17:40:43 +0000"  >&lt;p&gt;Thanks for your reply Dwight. One year ago we started our project using MongoDb, we namespaced at a key level our main collection (&lt;b&gt;entity.NAMESPACE.key&lt;/b&gt;) and that was our fault. Easily we reached 64 indexes so I was analyzing the options to fix this, refactoring the project or changing the limit of indexes.&lt;/p&gt;</comment>
                            <comment id="487359" author="dwight_10gen" created="Fri, 24 Jan 2014 17:13:39 +0000"  >&lt;p&gt;@William it wouldn&apos;t be that hard to do, but there hasn&apos;t been a lot of interest especially given multikey and full text features, so it has not been a priority.  in addition at higher #s i&apos;d want to verify that the query optimizer still works as well as it should so that might be the biggest job actually.  personally i&apos;d consider different schemas if I were getting to these levels, I haven&apos;t myself had a situation where i needed that many indexes on one collection.&lt;/p&gt;</comment>
                            <comment id="487124" author="wiliam" created="Fri, 24 Jan 2014 10:01:46 +0000"  >&lt;p&gt;What is the reason for limiting to 64 indexes? It&apos;s technicaly possible to add more than 64 indexes? 128? 512?&lt;/p&gt;</comment>
                            <comment id="178246" author="nkolev" created="Tue, 23 Oct 2012 17:13:24 +0000"  >&lt;p&gt;A full text search won&apos;t help. For now we are using a number of arrays where each array represents the index for a bucket of the fields we need to index on. However as the nature of the documents we store evolves we would bump into the limit again. Hopefully you guys can put removing this limit on your roadmap.&lt;/p&gt;</comment>
                            <comment id="168779" author="dwight_10gen" created="Thu, 27 Sep 2012 15:52:51 +0000"  >&lt;p&gt;nothing at the moment.  &lt;br/&gt;
if full text search feature were done would your requirement here go away?&lt;/p&gt;</comment>
                            <comment id="168206" author="nkolev" created="Wed, 26 Sep 2012 14:02:39 +0000"  >&lt;p&gt;Any plans on adding support for the (more) part?&lt;/p&gt;</comment>
                            <comment id="14803" author="douggreen" created="Tue, 15 Jun 2010 19:35:16 +0000"  >&lt;p&gt;Thanks Dwight!  Here&apos;s the 1.4.3 backport, which we&apos;ll be testing heavily over the coming days.&lt;/p&gt;</comment>
                            <comment id="14463" author="eliot" created="Wed, 26 May 2010 12:52:01 +0000"  >&lt;p&gt;seems to be working as far as i can tell&lt;/p&gt;</comment>
                            <comment id="14380" author="dwight_10gen" created="Sun, 23 May 2010 15:10:12 +0000"  >&lt;p&gt;code committed that hopefully works up to 64 indexes.  give it a try and let me know.&lt;/p&gt;</comment>
                            <comment id="14376" author="auto" created="Sat, 22 May 2010 16:54:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;dwight&apos;, &apos;name&apos;: &apos;Dwight Merriman&apos;, &apos;email&apos;: &apos;dwight@10gen.com&apos;}
&lt;p&gt;Message: towards &lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-1140&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-1140&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/584be9aca6c07ee4997ad01b3b9f7d4153656d6d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/584be9aca6c07ee4997ad01b3b9f7d4153656d6d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="14375" author="douggreen" created="Fri, 21 May 2010 23:58:40 +0000"  >&lt;p&gt;This fixes kill_ns leaks caused by passing the wrong input.&lt;/p&gt;

&lt;p&gt;I really need to learn how to submit this with git &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/sad.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="14374" author="douggreen" created="Fri, 21 May 2010 23:52:48 +0000"  >&lt;p&gt;Updated patch ... I think this works.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="57840">SERVER-7793</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="104514">SERVER-12250</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="10242" name="mongo-64-indexes-backport.patch" size="12915" author="douggreen" created="Tue, 15 Jun 2010 19:35:16 +0000"/>
                            <attachment id="10224" name="mongo-64-indexes.patch" size="8194" author="douggreen" created="Fri, 21 May 2010 23:58:40 +0000"/>
                            <attachment id="10223" name="mongo-64-indexes.patch" size="8029" author="douggreen" created="Fri, 21 May 2010 23:52:48 +0000"/>
                            <attachment id="10222" name="mongo-64-indexes.patch" size="6779" author="douggreen" created="Fri, 21 May 2010 00:28:15 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>16.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 22 May 2010 16:54:32 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 35 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 35 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>BitOne</customfieldvalue>
            <customfieldvalue>cade@hyperblaster.org</customfieldvalue>
            <customfieldvalue>douggreen</customfieldvalue>
            <customfieldvalue>dwight@mongodb.com</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>nkolev</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
            <customfieldvalue>wiliam</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpma7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrik1b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21898</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hszzdz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>