Log message #4199356

# At Username Text
# Aug 22nd 2019, 09:33 conehead Yes I have to admit I suck at databases as well. Just never thought this could have such an impact. Right now I am going through my whole database and check if I am missing some keys haha
# Aug 22nd 2019, 09:30 neon1024 These days I tend to build my initial database in MySQL Workbench, so that it adds those things for me :slightly_smiling_face:
# Aug 22nd 2019, 09:30 neon1024 My database skills are pretty lame. I always forget constraints and indexes
# Aug 22nd 2019, 09:27 conehead Sometimes the missing key caused a timeout...and I was loading just a single entity? :S
# Aug 22nd 2019, 09:25 neon1024 :thumbsup:
# Aug 22nd 2019, 09:23 conehead But as usual you hinted me into the right direction @neon1024 Thanks
# Aug 22nd 2019, 09:23 conehead How does this speed up things like 50 times?
# Aug 22nd 2019, 09:23 conehead Actually there was an (unique) index missing
# Aug 22nd 2019, 09:22 conehead Still strange that this one association sometimes slows evrything down
# Aug 22nd 2019, 09:21 conehead Ah...seems to be one association.
# Aug 22nd 2019, 09:20 conehead Yes
# Aug 22nd 2019, 09:20 neon1024 I presume it does if it’s a primary key
# Aug 22nd 2019, 09:20 neon1024 Does the column have an index?
# Aug 22nd 2019, 09:17 conehead This is really confusing me. If I just select the `Documents.id` it takes like 10 seconds to load. When I remove the select statement, the data is loading within like a second (which is as well still really slow)
# Aug 22nd 2019, 09:16 conehead Hmm anyone got an idea why my query slows really down as soon as I add an `select` to it?
# Aug 22nd 2019, 09:09 neon1024 At least for me, I don’t use the profiler. I just use XDebug for the pretty var_dump :P
# Aug 22nd 2019, 09:08 neon1024 https://php.ug/slackinvite
# Aug 22nd 2019, 09:08 neon1024 I would ask in the phpug slack
# Aug 22nd 2019, 09:06 slackebot2 xdebug.remote_port="9009" xdebug.remote_autostart=1 xdebug.remote_log="/Users/sebastiankoller/Sites/logs/xdebug.log" xdebug.idekey="PHPSTORM" xdebug.remote_host="localhost" xdebug.profiler_enable=0 xdebug.collect_assignments=1 xdebug.collect_params=4 xdebug.var_display_max_data=-1 Maybe anyone has an idea?
# Aug 22nd 2019, 09:06 koeller Good morning, I have a new machine and setup my development envrionment from scratch. Now when I'm running xdebug 2.7.3 through PHPStorm I won't see the content of an entity object at a given breakpoint in variables section anymore. I always have to use the the evaluator to get the actual value of an entity object. Thats a bit annoying. Here is my xdebug config: [xdebug] zend_extension="xdebug.so" xdebug.remote_enable=1
# Aug 22nd 2019, 08:41 neon1024 @mehov It’s not a rule, but as @challgren said, this channel is linked to the IRC channel, and that doesn’t support threads, so you’re excluding all the IRC people who might help you
# Aug 22nd 2019, 08:06 spriz I guess it is pretty much what you want @mehov
# Aug 22nd 2019, 08:06 spriz I have this code working at least: `'summed_price' => $expenseLineData->func()->sum('ExpenseLines.buying_price * ExpenseLines.quantity'),`
# Aug 22nd 2019, 08:06 spriz `'avgPrice' => $query->func()->avg('Table.salesTotal / Table.salesQuantity')` rather actually
# Aug 22nd 2019, 08:04 spriz @mehov did you try `$query->newExpr('Table.salesTotal / Table.salesQuantity'),` ?
# Aug 22nd 2019, 08:01 jiri.sejhar my english is so bad :slightly_smiling_face: i need read js file ES6 class layout(){ const layout_one = {} const layoutt_wo = {} } can i read this in php file like $js _object=es6parse('../layout.js') foreach ($js_object as $obj){ ..... }
# Aug 22nd 2019, 07:34 mehov Got it, I will no longer use Replies here if that's the rule
# Aug 22nd 2019, 07:29 conehead Not a window, but a "window" ;)
# Aug 22nd 2019, 07:08 mehov This is what it looks like to me. No windows to go to, just another sidebar. Thought it's more clean, organised and convenient, but I guess your experience differs. Okay got it.
# Aug 22nd 2019, 06:58 challgren I know you’d think it would be like comments on FB
# Aug 22nd 2019, 06:58 admad i annoying to have to go to another "windows" to see the thread msgs
# Aug 22nd 2019, 06:58 challgren But nah it messes with the IRC peeps
# Aug 22nd 2019, 06:57 challgren @admad = anti-thread
# Aug 22nd 2019, 06:57 admad ah the quantity various per row. plz stop using those stupid threads
# Aug 22nd 2019, 06:56 mehov @admad Yep, it's not accurate, unfortunately ``` 'salesTotal' => (float) 67.032, 'salesQuantity' => (float) 21, 'avgPrice' => (float) 5.15630769, ``` `avgPrice` is ~5.15, while the value I'm looking for is 3.192 (=67.032/21)
# Aug 22nd 2019, 06:47 mehov Wow, I missed that one, actually. Still, the more I think about it, I feel like in some cases that may be inaccurate. For example, if in some rows quantity is 4. Those will be counted as one row, but in fact had to be counted as (and the total divided by) 4
# Aug 22nd 2019, 06:39 mehov You baked a template, and got a .ctp file. Okay. The part about Javascript file doesn't make any sense though. Please edit; formatting and punctuation may help
# Aug 22nd 2019, 06:37 mehov This is hard to read, and therefore hard to understand
# Aug 22nd 2019, 06:29 jiri.sejhar i have some javascript object etc some layout in js file i can read this and in console case in which layout can i render new db table..
# Aug 22nd 2019, 06:27 jiri.sejhar hello i have bake template which generate ctp file .. can i in bake console read some javascript file on filesystem
# Aug 22nd 2019, 06:21 admad `'avgPrice' => $query->func()->avg('total')` in cake