<div dir="ltr">what kind of queries are you doing? odds are they can be optimized. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 13, 2015 at 12:59 PM, Marc Miquel <span dir="ltr"><<a href="mailto:marcmiquel@gmail.com" target="_blank">marcmiquel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:12.8000001907349px">Hello guys,</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I have a question regarding Tool Labs. I am doing research on links and although I know very well what I am looking for I struggle in how to get it effectively...</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I need to know your opinion because you know very well the system and what's feasible and what is not. </div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I explain you what I need to do: </div><div style="font-size:12.8000001907349px">I have a list of articles for different languages which I need to check their pagelinks and see where they point to and from where they point at them.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I now do a query for each article id in this list of articles, which goes from 80000 in some wikipedias to 300000 in other and more. I have to do it several times and it is very time consuming (several days). I wish I could only count the total of links for each case but I need to see only some of the links per article.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I was thinking about getting all pagelinks and iterating using python (which is the language I use for all this). This would be much faster because I'd save all the queries, one per article, I am doing now. But pagelinks table has millions of rows and I cannot load that because mysql would die. I could buffer, but I haven't tried if it works also.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I am considering creating a personal table in the database with titles, ids, and inner joining to just obtain the pagelinks for these 300.000 articles. With this I would just retrieve 20% of the database instead of the 100%. That would be maybe 8M rows sometimes (page_title or page_id, one of both per row), or even more... loaded into python dictionaries and lists. Would that be a problem...? I have no idea of how much RAM this implies and how much I can use in Tool labs.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I am totally lost when I get these problems related to scale...I thought about writing to the IRC channel but I thought it was maybe too long and too specific. If you give me any hint that would really help.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Thank you very much!</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Cheers,</div><div style="font-size:12.8000001907349px"><br></div><span style="font-size:12.8000001907349px">Marc Miquel</span><br><div hspace="streak-pt-mark" style="max-height:1px"><img style="width:0px;max-height:0px" src="https://mailfoogae.appspot.com/t?sender=abWFyY21pcXVlbEBnbWFpbC5jb20%3D&type=zerocontent&guid=ed0bde28-0ee9-4be2-b012-d1d924f876b2"><font color="#ffffff" size="1">ᐧ</font></div></div>
<br>_______________________________________________<br>
Labs-l mailing list<br>
<a href="mailto:Labs-l@lists.wikimedia.org">Labs-l@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/labs-l" target="_blank">https://lists.wikimedia.org/mailman/listinfo/labs-l</a><br>
<br></blockquote></div><br></div>