Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^8: Creating SELECT-like look-up tables as hashes

by loris (Hermit)
on Dec 05, 2013 at 12:52 UTC ( #1065751=note: print w/replies, xml ) Need Help??

in reply to Re^7: Creating SELECT-like look-up tables as hashes
in thread Creating SELECT-like look-up tables as hashes

Yes, on Id for Real_Events and on Name1, Name2, Group for Potential_Events.


  • Comment on Re^8: Creating SELECT-like look-up tables as hashes

Replies are listed 'Best First'.
Re^9: Creating SELECT-like look-up tables as hashes
by BrowserUk (Pope) on Dec 05, 2013 at 19:51 UTC

    My best DB days are long behind me (DB2), and I've done very little with sqlite so take this with a big pinch of salt, but seems to me that given your queries, an index in (Real_?)Events.Id is doing you no good at all.

    I'd be tempted to try adding an index on (at least) the date field. (And possibly dropping the one on Id.)

    As far as your HoAs is concerned, it might be worth considering sorting the arrays by data and using a binary search.

    I suspect that this thread has gotton too deep to be getting the eyeballs you really need to get good suggestions for this problem. If you can find the time, you might try consolidating the information you've given in this sub-thread and making a post to the sqlite mailing list asking for the best way to optimise those queries.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Thanks for the advice. I definitely need to look at indexing in more detail and posting on the sqlite list is probably a good idea.



Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1065751]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2018-05-21 13:40 GMT
Find Nodes?
    Voting Booth?