How would be the fastest way to query for a certain txid to get its inputs?

I am working in an artistic/visualization project that analyses Bitcoin transactions. I have a Bitcore instance with insight API and from a Python script I query through the REST API so the queries are returned in json format. For the project I use a macbook pro and with its internal ssd drive I get around 70 queries per second, using an external NTFS (fuse drivers) driver I get as little as 5 per second.

I would like to know if there is a faster way to query transactions by transaction’s hash even if it is more complex to code.

What would be the fastest way to query for a certain txid to get its inputs?

Recent Questions – Bitcoin Stack Exchange

Can I get confirmation time from txid (tx_hash)?

I want to get how long it takes time to get first confirmation for each transactions.

My plan is this below.

  1. I’m subscribing mempool txes notification from my bitcoind node and I will save it with time.
  2. I receive a block generate notification which contains the saved mempool-tx. Then I will calculate the confirmation time. (confirmation time = mempool save time – block notification time)

This is a little bit hassle. It would be easy if I can get the time by txid. Is it possible? or Do you have any better ideas?

Recent Questions – Bitcoin Stack Exchange