-
-
Notifications
You must be signed in to change notification settings - Fork 671
-
-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace most of .inspect()
(and datasette inspect
) with table counting
#462
Comments
Here's the current contents of that file: https://github.com/simonw/datasette/blob/ce09e5d2d392634eced44c3c8d603d7c628e2822/tests/test_inspect.py |
So I think {
"fixtures": {
"hash": "894870db97229e9e18b40921dc32b581da813465d672445e96e040ab2adbd229",
"file": "fixtures.db",
"size": 225280,
"tables": {
"facetable": {
"count": 34,
}
}
} It currently writes it out to a file called Here's the current
|
I'm going to change it to output to stdout unless you pass it the |
Refs #462 * inspect command now just outputs table counts * test_inspect.py is now only tests for that CLI command * Updated some relevant documentation * Removed docs for /-/inspect since that is about to change
I now need to update |
This is the last part of #419 - with the move to supporting mutable databases by default, the inspect-data mechanism currently in use no-longer makes much sense.
The one optimization I think it's worth keeping for databases opened in immutable mode is the cached table counts. I think
datasette inspect
should cut down to only counting the rows in the tables - the other things done by inspect (figuring out columns, foreign key relationships, FTS etc) should all be fast enough that they can be reliably performed at runtime even against large databases.If performing them at run-time has performance issues, I would rather cache those results internally within Datasette after they are first calculated than continue to support them in the
datasette inspect
command - to keep things simpler.The text was updated successfully, but these errors were encountered: