« first day (1291 days earlier)      last day (1367 days later) » 

1:10 AM
is good if a table have single index on a and b colum , and have other composite index on a and b column ?
I mean an index on (a), an index on (b), and another index on (a,b)
 
 
2 hours later…
3:30 AM
@reza_daulay depends on what you need it for. In that case, though, the index on (a) is mostly irrelevant, the index on (a,b) can be used wherever the index on (a) could be used
 
 
13 hours later…
4:45 PM
hi again! I'm having trouble with this sql:
SELECT DISTINCT `personas`.`id_persona`,
`datos_laborales`.`fec_inicio`,
`datos_laborales`.`fec_fin`,
`datos_academicos`.`id_tipo_estudio`
FROM (`personas`)
JOIN `datos_laborales` ON `datos_laborales`.`id_persona` = `personas`.`id_persona`
JOIN `datos_academicos` ON `datos_academicos`.`id_persona` = `personas`.`id_persona`
WHERE (`datos_laborales.cargo` LIKE 'Asistente%')
GROUP BY `personas`.`id_persona`
ORDER BY `personas`.`id_persona` DESC
I get this error: Unknown column 'datos_laborales.cargo' in 'where clause'
 
hi guys, can anyone think of a reason why my apache logs might be counting users that my application doesnt see? e.g. my apache logs say i have had 100 users from my ads, but DB impressions (first thing on page) counts around 30.
i'm thinking someone is doing this: <img src='http://ads.example.com/campaign-url' /> which will hit apache, but as it's an image wont actually load the php module / my views?
or, is it something else? I'm quite to very stuck on this
and i want to blame the advertiser so i can get a refund on the clicks they're sending
 
@Ant100 it looks like you haven't joined the datos_laborales table into that query :-x
@Andy I would guess that Apache was caching results for various responses
it could also be an error in your logging (do you watch your PHP error logs?)
 
@TehShrike oh, i thought this was for joining the table: JOIN datos_laborales ON datos_laborales.id_persona = personas.id_persona
 
you're right, I missed that
stupid brain, not optimized for non-English words >:-|
Does that table contain a cargo column?
 
@TehShrike haha I'm sorry! I'll try to translate it to make it easier
@TehShrike yes it does
 
4:53 PM
no, don't worry about translating it
@Ant100 can you paste the schema of that table?
 
yes wait a sec
[Table] => datos_laborales
[Create Table] => CREATE TABLE `datos_laborales` (
`id_datos_laborales` int(11) NOT NULL AUTO_INCREMENT,
`id_persona` int(11) DEFAULT NULL,
`nom_empresa` varchar(150) CHARACTER SET utf8 COLLATE utf8_spanish_ci DEFAULT NULL,
`cargo` varchar(100) CHARACTER SET utf8 COLLATE utf8_spanish_ci DEFAULT NULL,
`fec_inicio` date DEFAULT NULL,
`fec_fin` date DEFAULT NULL,
`motivo_retiro` varchar(250) CHARACTER SET utf8 COLLATE utf8_spanish_ci DEFAULT NULL,
`key` varchar(32) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL,
 
@Ant100 oh duh I see it
sorry
datos_laborales.cargo is not an identifier
datos_laborales is an identifier, and cargo is an identifier
so, individually you could put them inside backticks
but together inside of backticks they make no sense
the error message even says it: "datos_laborales.cargo" is not the name of a column
 
@TehShrike oh! so I should put backticks to both of them
 
@Ant100 yeah, datos_laborales.cargo is valid/correct
whoops, it removed them
`datos_laborales`.`cargo`
 
@TehShrike yes that was it :) lol thanks again man!!
 
5:01 PM
no problem :-)
 
@TehShrike erros? yes i do, although it's tricky to correlate that to the issues i'm having
can you think of any tools that might be able to combine the two to bring me up some comparisons?
 
@Andy you have errors in your error log and you don't know what's causing them?
you gotta get on that!
 
No, it's not that
i know what they
are
but i'm unsure how i can link a particular apache "GET" with the relevant error within the php error file
am i making any sense?
 
how would you identify the request?
 
based on the URL i guess?
so lets say i have this request within apache: 14.158.149.119, 80.187.96.115 - - [18/Sep/2014:16:18:29 +0100] "GET /ad-viewer-init.php HTTP/1.1" 200 2149"-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; GTB7.5; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C; .NET4.0E; OfficeLiveConnector.1.5; OfficeLivePatch.1.3)"
and it causes a PHP error, how could i like the two?
this would then help me narrow down the DB issues
but fucked if i know 0_o
 
5:18 PM
@Andy what would you even link it to?
or rather, what good would it do you?
you probably want to match it up with whatever process Apache ran in order to produce the result, and then find the result code of that process
have you looked into caching?
are you certain that Apache isn't caching responses?
 
the issue for me is that i've been overcharged for a lot of traffic by my advertiser. I'm also concerned because there is also a drop off between Apache and my DB traffic tables. You mentioned that maybe the PHP error log could help me. But i am trying to see how i can find an error and then that request in apache
 
have you guaranteed that every call to /ad-viewer-init.php will cause a new PHP instance to fire?
 
have you guaranteed that every call to /ad-viewer-init.php will cause a new PHP instance to fire?
that is a good question
i'm assuming that this is the case yes, but how can i confirm?
ref: Apache Caching, i havent a clue
 
it's Apache's job to be smart and cause as little load as possible for a large number of requests
well there are lots of places to start I suppose
find out what Apache settings control that, and compare them to your production settings
you could create a local Apache instance with the same settings as you use in production, and just test it yourself to see
 
ok, that's something new for me to learn :)
i hate server admin, it's such a pain
i'll have a gander and see if i can find a way to solve this issue that way
ok, seems i'm not caching anything with apache
 
 
4 hours later…
9:51 PM
I'm really sorry, but i really need some help on this question stackoverflow.com/questions/25902013/… If anyone can throw in a second thought that would be great
 

« first day (1291 days earlier)      last day (1367 days later) »