You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "Arsnael (via GitHub)" <gi...@apache.org> on 2024/04/25 09:14:01 UTC
[PR] JAMES-2586 Add missing mailbox_name field in mailbox index [james-project]
Arsnael opened a new pull request, #2215:
URL: https://github.com/apache/james-project/pull/2215
I don't see any sql select where we query on only username and namespace, there is always also the maibox name as well (cf `findMailboxByPath`, `findMailboxWithPathLike`, `hasChildren` methods in `PostgresMailboxDAO`)
Thus I conclude that this field was missing from the index?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Add missing mailbox_name field in mailbox index [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #2215:
URL: https://github.com/apache/james-project/pull/2215#issuecomment-2076783269
Any way to use `EXPLAIN` utility for analysing `findMailboxByPath` and `findMailboxWithPathLike` and ensure the index is well used in both case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Add missing mailbox_name field in mailbox index [james-project]
Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael commented on PR #2215:
URL: https://github.com/apache/james-project/pull/2215#issuecomment-2076835865
Explain findMailboxWithPathLike

Using unique constraint key too
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Add missing mailbox_name field in mailbox index [james-project]
Posted by "quantranhong1999 (via GitHub)" <gi...@apache.org>.
quantranhong1999 commented on PR #2215:
URL: https://github.com/apache/james-project/pull/2215#issuecomment-2076838248
> Should we delete the index on mailbox then, as the unique key constraint on those 3 fields seems to do the job?
I was about to comment that. +1 deleting the index.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Add missing mailbox_name field in mailbox index [james-project]
Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael commented on PR #2215:
URL: https://github.com/apache/james-project/pull/2215#issuecomment-2076821351
Didn't know EXPLAIN, you are right, it shows that we actually do not use the index atm.
EXPLAIN for findMailboxByPath:

EXPLAIN with just username and namespace:

We can see that the request done by findMailboxByPath does not use the index, while I verified that the explain command really tells you that you are using the index when you do, like in the second example with only namespace and username, that the current index is only based on
When I deploy this fix I will verify again with explain that we hit this time the index for both methods
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Remove mailbox index [james-project]
Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael commented on PR #2215:
URL: https://github.com/apache/james-project/pull/2215#issuecomment-2078560865

Fair enough, thanks for the explanation.
Forget this PR :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Remove mailbox index [james-project]
Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael closed pull request #2215: JAMES-2586 Remove mailbox index
URL: https://github.com/apache/james-project/pull/2215
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Remove mailbox index [james-project]
Posted by "vttranlina (via GitHub)" <gi...@apache.org>.
vttranlina commented on PR #2215:
URL: https://github.com/apache/james-project/pull/2215#issuecomment-2078540265
> Explain findMailboxWithPathLike
>
> 
>
> Using unique constraint key too
can you try query with `LIKE "prefix%"` ?
(contain `%` character)
This index was created at pr: https://github.com/apache/james-project/pull/1984#issue-2121940886
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Add missing mailbox_name field in mailbox index [james-project]
Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael commented on PR #2215:
URL: https://github.com/apache/james-project/pull/2215#issuecomment-2076829454
Actually, wait... reading again... the first one uses the `mailbox_mailbox_name_user_name_mailbox_namespace_key` unique constraint defined in mailbox?
=> https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-UNIQUE-CONSTRAINTS
according to the doc, an index is created for unique constraints. So technically we can deduce that wherever we declare in the code a unique constraint, we dont need an other index next to it?
Should we delete the index on mailbox then, as the unique key constraint on those 3 fields seems to do the job?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org