Number querying is performed from your main account; therefore, the other party will be notified about information related to your main account. So, we advise you to be careful while querying a number.
However, if you go to profile via a call log from your second number, the other party will not be notified, and your identity will not be visible. The information also will not be send if you go to profile via SMS chats.