I tested with a reasonably fast SSD (on MacBook Pro M2 lol), but saw similar results.
Hereâs our query:
âââlog
2024-07-26 10:56:05.813 [eventLoopGroupProxy-4-1] INFO t.t.d.client.XTDBClient w/interface - entity-query*{âqueryâ:{âqueryâ:{âsectionsâ:[{â@classâ:âxtdb.api.query.domain.FindSectionâ,âclausesâ:[{â@classâ:âxtdb.api.query.domain.Pullâ,âsymbolâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âGenStructureâ},âspecâ:{âitemsâ:[{â@classâ:âxtdb.api.query.domain.PullSpec$ALLâ}]}}]},{â@classâ:âxtdb.api.query.domain.WhereSectionâ,âclausesâ:[{â@classâ:âxtdb.api.query.domain.HasKeyEqualToâ,âdocumentâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âGenStructureâ},âkeyâ:{â@classâ:âxtdb.api.query.domain.Keywordâ,ânameâ:âtech.tongyu.data.model.GenStructure.contextâ},âvalueâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âcontextâ}},{â@classâ:âxtdb.api.query.domain.HasKeyEqualToâ,âdocumentâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âGenStructureâ},âkeyâ:{â@classâ:âxtdb.api.query.domain.Keywordâ,ânameâ:âtech.tongyu.data.model.GenStructure.modelDataâ},âvalueâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âmodelDataâ}},{â@classâ:âxtdb.api.query.domain.HasKeyEqualToâ,âdocumentâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âGenStructureâ},âkeyâ:{â@classâ:âxtdb.api.query.domain.Keywordâ,ânameâ:âtech.tongyu.data.model.GenStructure.modelInfoâ},âvalueâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âmodelInfoâ}},{â@classâ:âxtdb.api.query.domain.HasKeyEqualToâ,âdocumentâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âGenStructureâ},âkeyâ:{â@classâ:âxtdb.api.query.domain.Keywordâ,ânameâ:âtech.tongyu.data.model.GenStructure.modelNameâ},âvalueâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âmodelNameâ}},{â@classâ:âxtdb.api.query.domain.HasKeyEqualToâ,âdocumentâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âGenStructureâ},âkeyâ:{â@classâ:âxtdb.api.query.domain.Keywordâ,ânameâ:âtech.tongyu.data.model.GenStructure.modelTypeâ},âvalueâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âmodelTypeâ}},{â@classâ:âxtdb.api.query.domain.HasKeyEqualToâ,âdocumentâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âGenStructureâ},âkeyâ:{â@classâ:âxtdb.api.query.domain.Keywordâ,ânameâ:âtech.tongyu.data.model.GenStructure.underlyerâ},âvalueâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âunderlyerâ}},{â@classâ:âxtdb.api.query.domain.HasKeyEqualToâ,âdocumentâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âGenStructureâ},âkeyâ:{â@classâ:âxtdb.api.query.domain.Keywordâ,ânameâ:âxt/idâ},âvalueâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âxt/idâ}},{â@classâ:âxtdb.api.query.domain.Predicateâ,âtypeâ:âEQâ,âiâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âxt/idâ},âjâ:{â@classâ:âxtdb.api.query.domain.PlainValueâ,âvalueâ:âtech.tongyu.data.model.GenStructure.EOD_CONTEXT.TRADER_VOL.VOL_SURFACE.600309.SHâ}}]},{â@classâ:âxtdb.api.query.domain.BindSectionâ,âclausesâ:[{â@classâ:âxtdb.api.query.domain.CollectionBindâ,âsymbolâ:{â@classâ:âxtdb.api.query.domain.Symbolâ,ânameâ:âmodelNameâ}}]}]},âbindingsâ:[[âFX_VOLâ,âTRADER_VOLâ,âRISK_FREE_CURVEâ,âDIVIDEND_CURVEâ,âCORRELATION_MATRIXâ]]},âvtâ:â2024-06-30T19:00:00+08:00â,âttâ:â2024-06-30T10:12:45.688+08:00â}
2024-07-26 10:56:05.822 [eventLoopGroupProxy-4-1] DEBUG xtdb.query - :query {:find [(pull GenStructure [*])], :where [[GenStructure :tech.tongyu.data.model.GenStructure.context context] [GenStructure :tech.tongyu.data.model.GenStructure.modelData modelData] [GenStructure :tech.tongyu.data.model.GenStructure.modelInfo modelInfo] [GenStructure :tech.tongyu.data.model.GenStructure.modelName modelName] [GenStructure :tech.tongyu.data.model.GenStructure.modelType modelType] [GenStructure :tech.tongyu.data.model.GenStructure.underlyer underlyer] [GenStructure :xt/id xt/id] [(== xt/id âtech.tongyu.data.model.GenStructure.EOD_CONTEXT.TRADER_VOL.VOL_SURFACE.600309.SHâ)]], :in {:bindings [[:collection [modelName âŠ]]]}}
2024-07-26 10:56:05.826 [eventLoopGroupProxy-4-1] DEBUG xtdb.query - :triple-joins-var->cardinality {modelName 0.0079500817227403, GenStructure 1047.9502002488548, xt/id 29.699224709972576, context 1.7976931348623157E308}
2024-07-26 10:56:05.827 [eventLoopGroupProxy-4-1] DEBUG xtdb.query - :triple-clause-var-order [modelName GenStructure xt/id context]
2024-07-26 10:56:05.829 [eventLoopGroupProxy-4-1] DEBUG xtdb.query - :join-order :ave modelName GenStructure {:e GenStructure, :a :tech.tongyu.data.model.GenStructure.modelName, :v modelName}
2024-07-26 10:56:05.829 [eventLoopGroupProxy-4-1] DEBUG xtdb.query - :join-order :aev GenStructure xt/id {:e GenStructure, :a :crux.db/id, :v xt/id}
2024-07-26 10:56:05.829 [eventLoopGroupProxy-4-1] DEBUG xtdb.query - :join-order :aev GenStructure context {:e GenStructure, :a :tech.tongyu.data.model.GenStructure.context, :v context}
2024-07-26 10:56:06.091 [eventLoopGroupProxy-4-1] DEBUG xtdb.memory - :pool-allocation-stats {:allocated 393216, :deallocated 0, :in-use 393216}
2024-07-26 10:56:07.427 [eventLoopGroupProxy-4-1] DEBUG xtdb.memory - :pool-allocation-stats {:allocated 524288, :deallocated 0, :in-use 524288}
2024-07-26 10:56:07.477 [eventLoopGroupProxy-4-1] DEBUG xtdb.memory - :pool-allocation-stats {:allocated 655360, :deallocated 0, :in-use 655360}
2024-07-26 10:56:07.528 [xtdb.io.cleaner-thread] DEBUG xtdb.memory - :pool-allocation-stats {:allocated 655360, :deallocated 131072, :in-use 524288}
2024-07-26 10:56:07.528 [xtdb.io.cleaner-thread] DEBUG xtdb.memory - :pool-allocation-stats {:allocated 655360, :deallocated 262144, :in-use 393216}
2024-07-26 10:56:09.071 [eventLoopGroupProxy-4-1] INFO ktor.application - 200 OK: POST - /_xtdb/query in 3360ms
âââ