Skip to content
Advertisement

Tag: database

Need help understanding Postgresql query execution

I have a generated query from an ORM that selects data from a nested join on a junction table. When executing it looks like it performs a full table scan on a table with >55 million records resulting in a slow execution time. My expectation was that it would perform the filtering first then lookup by index for the join.

Sharding a RDBMS (SQL) database

I am reading about sharding and I understood it upto some context. But most of the material I read says that sharding (horizontally scaling) RDBMS is a challenging task. But I don’t see why NO-SQL is easy to shard and RDBMS would be tough to shard? My understanding is: some NO-SQL provides inbuilt sharding support which makes it easy to

1064 You have an error in your SQL syntax; check the manual … for the right syntax to use near ‘WHERE reviews.yes_no = yes

I want to optimise the queries on my project and after many tentatives of using eager loading with datatables i just give up because there was no query reducing at all. Anyway now Im trying to achieve that using join, but the problem is that using WHERE clause in DB::RAW it gives me the following error: “Exception Message:nnSQLSTATE[42000]: Syntax error

How to count favorites and all data of an other table with JOIN

I try to select the favorites for each wines in my database and all data from wines but with the group by obligation, I can’t have data for wines which don’t have a favorite_score, so do you know how to do please. This is my SQL request for instance and now this my DB diagram : enter image description here

How can I change the layout/structure of my table?

I currently have a table with 3 columns in it. The columns are best described as group_id, task and task_count. There are up to 15 possible tasks and over 500,000 group_ids. The task_count is the number of events that took place in a group_id for that task. Currently, the table looks like this: So in group 5555 we only have

SQL – count function not working correctly

I’m trying to count the blood type for each blood bank I’m using oracle DB the blood bank table is created like this when I use the count function the result would be like this so why the count function is not working correctly? I’m trying to display each blood bank blood type count which is not only one in

Advertisement