mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fix huge performance bug in DateFacet, refs #2407
This commit is contained in:
parent
f28ff8e4f0
commit
bc46066f9d
1 changed files with 2 additions and 2 deletions
|
|
@ -480,8 +480,8 @@ class DateFacet(Facet):
|
||||||
# Does this column contain any dates in the first 100 rows?
|
# Does this column contain any dates in the first 100 rows?
|
||||||
suggested_facet_sql = """
|
suggested_facet_sql = """
|
||||||
select date({column}) from (
|
select date({column}) from (
|
||||||
{sql}
|
select * from ({sql}) limit 100
|
||||||
) where {column} glob "????-??-*" limit 100;
|
) where {column} glob "????-??-*"
|
||||||
""".format(
|
""".format(
|
||||||
column=escape_sqlite(column), sql=self.sql
|
column=escape_sqlite(column), sql=self.sql
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue