Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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.

loris


Comment on Re^8: Creating SELECT-like look-up tables as hashes
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.

      Cheers,

      loris

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1065751]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-11-23 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (130 votes), past polls