diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 073a9f7b..19397885 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -8,6 +8,9 @@ Changelog - Add :class:`pandas_gbq.Context` to cache credentials in-memory, across calls to ``read_gbq`` and ``to_gbq``. (:issue:`198`, :issue:`208`) +- Fast queries now do not log above ``DEBUG`` level. (:issue:`204`). + With BigQuery's release of `clustering `__ + querying smaller samples of data is now faster and cheaper. .. _changelog-0.6.1: diff --git a/pandas_gbq/gbq.py b/pandas_gbq/gbq.py index 6add4cdc..450aa250 100644 --- a/pandas_gbq/gbq.py +++ b/pandas_gbq/gbq.py @@ -293,7 +293,7 @@ def _start_timer(self): def get_elapsed_seconds(self): return round(time.time() - self.start, 2) - def log_elapsed_seconds(self, prefix="Elapsed", postfix="s.", overlong=7): + def log_elapsed_seconds(self, prefix="Elapsed", postfix="s.", overlong=6): sec = self.get_elapsed_seconds() if sec > overlong: logger.info("{} {} {}".format(prefix, sec, postfix)) @@ -357,7 +357,7 @@ def run_query(self, query, **kwargs): job_config=bigquery.QueryJobConfig.from_api_repr(job_config), location=self.location, ) - logger.info("Query running...") + logger.debug("Query running...") except (RefreshError, ValueError): if self.private_key: raise AccessDenied(