# Inner join and config of Logstash and JDBC

**URL:** https://discuss.elastic.co/t/inner-join-and-config-of-logstash-and-jdbc/204406
**Category:** Logstash
**Created:** [October 21, 2019, 7:18am UTC](https://discuss.elastic.co/t/inner-join-and-config-of-logstash-and-jdbc/204406 "2019-10-21T07:18:47Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [October 21, 2019, 1:32pm UTC](https://discuss.elastic.co/t/inner-join-and-config-of-logstash-and-jdbc/204406/2 "2019-10-21T13:32:17Z")

</div>

1. The jdbc input (via the mixin) will, under some circumstances, attempt to [count](https://github.com/logstash-plugins/logstash-input-jdbc/blob/c7c91c408fdf6ea5e45a1758dbe74cc48fcc6a40/lib/logstash/plugin_mixins/jdbc/checked_count_logger.rb#L27) the number of rows the query will return

2. My reading of the [documentation](https://www.rubydoc.info/gems/sequel/4.38.0/Sequel%2FDataset:count) for the sequel library that the input is based on is that it implements .count by doing a SELECT count(...) ... LIMIT 1

3. Firebird does not support LIMIT 1, it uses FIRST 1 instead

4. The jdbc mixin should be detecting that .count does not work and stop using it, so you should get this error once but everything works as expected

5. I would expect you to be seeing these two warnings

```auto
"Attempting a count query raised an error, the generated count statement is most likely incorrect but check networking, authentication or your statement syntax"
"Ongoing count statement generation is being prevented"

```

---

_[View the full topic](https://discuss.elastic.co/t/inner-join-and-config-of-logstash-and-jdbc/204406)._
