What are the 'SELECT _' entries in the web-ui transactions list?

Hello,

i was wondering what all these ‘SELECT _’ transactions are about.
Where do they come from? I couldn’t find any details about them.
Are they actually some kind of statement like ‘SELECT 1’ where the 1 gets sanitized?
Are they all generated by something internal to cockroachdb? I never notices such statements from our app. :man_shrugging:

Best regards,
Eric

Hi! Interesting find.

Where do they come from?

If you click on one of them, the statement details should show you the “app name” (a setting specified by the client) that ran this query. That might give you a clue.

Are they actually some kind of statement like ‘SELECT 1’ where the 1 gets sanitized?

Yes, on this page constants are normalized to _ so that related queries show up in the same row. It probably is a SELECT 1.

Are they all generated by something internal to cockroachdb? I never notices such statements from our app.

No, CockroachDB doesn’t make these queries. However, it is pretty common for frameworks or connection pools to make “healthcheck” queries like this. Are you using any tool like that?

Hi Rafi!

Thank you for catching up on this.

After some time of no response i created a support ticket with the same question and forgot to actually update this post with the answers/results i got from there.

Kevin K. was very helpful and confirmed that they are issued by the ActiveRecord Postgresql adapter which is used by the CockroachDB adapter which we use in our rails app.

Best regards,
Eric