Slingshot Alternative

I use the Slingshot Package to query a SQLite Database. Slingshot hasn’t been updated for a few years. Is there a better (faster) package / method that can access SQLite?

In my experience, Slingshot still works very well, and is fast even with very large data sets

I’m not aware of any alternatives

If you are having performance problems, then Slingshot might not be the problem- I’d suggest looking at:

  • data structure- is the data indexed ?
  • query- particularly queries with joins. What kind of query is it ?i.e SELECT, UPDATE, INSERT etc
  • location of data file- might not perform well from a network drive
  • If it is a massive database with a lot of changes over time, a VACUUM might speed it up

Andrew

1 Like

Thank you for your response @Andrew_Hannell

My Database is indexed. Query is SELECT. My database is on my harddrive. I will look into VACUUM.

I think you are right - my database has less than 3000 rows. It seems to be the Dynamo Nodes that slow things down. Every time I run my routine I need to restart Revit. If I don’t there seems to be a massive lag - even modelling simple things isn’t possible after running the Graph.

I have attached my Graph. I think I need to convert a lot of it to Python to speed things up…0BV Data-Apply DB SQL.dyn (201.1 KB)

I’ll have a look at your graph later

but 3000 rows is nothing for a database- if it was millions, then issues such as indexing/vacuum would come into play.

1 Like

At some point I need to start entering BIM information into my SQLite database for my Revit objects. I’m a bit nervous about the time it will take for my Graph to run to retrieve the BIM information.

It is a complex graph and I don’t fully understand it particularly without the model or the associated database

but I would suggest doing the heavy lifting within the query, rather than a series of nodes such as List.FilterByBooleanMask, ReplaceByCondition or ==

Some SQL functions such as CAST might be quicker than StringToNumber nodes and could be included in the query

Finally, you could combine 2 queries such as
select Size from Families where ID="+ID
select Model from Families where ID="+ID

into one:
select Size,Model from Families where ID="+ID;

1 Like

How do you create an UPDATE command in Slingshot.
I downloaded SLINGSHOT and only INSERT INTO and SELECT FROM are available nodes.

I dont have DELETE or UPDATE

You use the relevant Slingshot “command” node and feed in a query

You probably want to match up model records with database records using a particular key- so you will need to use a ‘where’ clause in the query

For example- something like the elementID

update tblRoom set RoomName = 'Bathroom' where ElementID=940325

1 Like

Thanks, that was exactly the answer i needed