Lucid: you could, possibly.

 
Keiter: Lucid: an eternity, by today’s standards.

Trowbridge: Keiter: yeah but that’s the flat-wrong query. The like query alone is 0.02s

Loveland: Keiter: select * from Sellers WHERE name LIKE ‘the%’;

Keiter: Lucid: see salle’s comments.

Ruoho: Trying to understand MAXrank

Tippens: Salle: Interestingly, the spec even allows for functional dependencies between based tables in one server and ‘foreign table’s of a foreign server. But these are not guarenteed.

Shroff: I know what it does, but I don’t know why I’d want the max rank

Keiter: Lucid: to answer that question, you need to understand how aggregation works, and what a functional dependency is

Remele: Given a search input I want the seller’s name, current rank todays date, days since last rank update probably 1 day or 7 days, and the change in rank

Keiter: Lucid: well, how do you think you’ll track down rank changes?

Barranger: Keiter: I was expecting to do it by date

Keiter: Lucid: be more specific.

Animashaun: Hello. How much ram does MySQL need for a smallish database?

Duckwall: Keiter: select rank, date from Ranks where sellerId=1234 ORDER BY date DESC LIMIT 2;

Gribbins: 0,5 GB of ram should do it ?

Awyie: Keiter: the reason I think MAXrank is hard is because I need them in order of the dates; rank can go up or down so current rank might not be the max rank, the max rank is sort of ambiguous

Keiter: Smurfke: seriously, we can’t answer that question unless you tell us how much available RAM you have, how much data and indexes you have.

Keiter: Lucid: how do you populate the ranks table?

Toca: Keiter: ah ok I’m sorry, cannot estimate it yet

Holtmann: Keiter: from a 3rd party source

Keiter: Lucid: be more specific

Keiter: Smurfke: how much available RAM do you have?

Galik: Keiter: from a website with a big list of links, and I take all the links and figure out which page and which place on the page and calculate the rank

Wainio: Keiter: so page 1 spot 1 = rank 1. page 2 spot 1 = rank 51. etc

Keiter: Lucid: in that case, you can join the ranks table n times, depending on what you need from it.

Keiter: Smurfke: a good starting point might be 50-60% of that, if you have that much data and indexes

Vardaman: Keiter: is this kind of thing evil? select select rank from Ranks WHERE sellerId=1234 ORDER BY date DESC LIMIT 1 – select rank from Ranks WHERE sellerId=1234 ORDER BY date DESC LIMIT 1,1;

Paillant: Keiter: that’s the change value I want, but then each of those is a dependent subquery :

Koestler: I don’t know if it matters that the queries are very limited in scope or not. I don’t see how you can deterministically get the past 2 ranks for a particular sellerId without the sellerId!

Damour: Keiter: that particular example has the sellerId hardcoded, but in a query with joins and the like, wouldn’t it?

Samowitz: Keiter: oh because its in the select for that sellers details in the queries?

Keiter: Lucid: I think you’re still confused.

Celis: Keiter: my problem is that it bridges two tables with conditions

Mcguirt: As soon as that happens I start wanting to do all kinds of crazy things that I know are wrong

Keiter: Lucid: so joining table in subqueries makes it dependant?

Elchert: Keiter: so you’re back to the “joining Ranks n times” thing.

Asiello: Keiter: I’ll see if I can figure that out

Keiter: Lucid: no, I’m just trying to clarify a few of your misconceptions.

Keiter: Lucid: you have a long way to go before you can solve your problem

Boilard: Keiter: am I understanding that you’d want to join the Ranks table twice in that case, for LastRank and CurrentRank?

Keiter: Lucid: you could, possibly.